diff options
| author | Pliable Pixels <pliablepixels@users.noreply.github.com> | 2016-08-22 10:23:36 -0400 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2016-08-22 10:23:36 -0400 |
| commit | 71045ed744f17d645c69295fc849e5cb4ab9b866 (patch) | |
| tree | add69263eb4e6fda7e5d345405c39596583dc96a /www/js | |
| parent | 74e27bd51198e47d8a42157696cfc56ebb3328cb (diff) | |
| parent | 25e440861a7c31877f7ad0d4992cc0de6c0dce02 (diff) | |
Merge pull request #307 from sctt/master
Added Wake-Sleep-Reset control commands
Former-commit-id: f204c7f041fe8773ff418154f6db69743f77eeed
Diffstat (limited to 'www/js')
| -rw-r--r-- | www/js/MonitorCtrl.js | 7 | ||||
| -rw-r--r-- | www/js/MonitorModalCtrl.js | 21 | ||||
| -rw-r--r-- | www/js/MontageCtrl.js | 7 |
3 files changed, 32 insertions, 3 deletions
diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js index 97110760..900084cb 100644 --- a/www/js/MonitorCtrl.js +++ b/www/js/MonitorCtrl.js @@ -346,6 +346,11 @@ angular.module('zmApp.controllers') $scope.LoginData = ZMDataModel.getLogin(); $rootScope.modalRand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111; + + $scope.ptzWakeCommand = ""; + $scope.ptzSleepCommand = ""; + $scope.ptzResetCommand = ""; + $scope.ptzMoveCommand = ""; $scope.ptzStopCommand = ""; @@ -493,4 +498,4 @@ angular.module('zmApp.controllers') }; -}]);
\ No newline at end of file +}]); diff --git a/www/js/MonitorModalCtrl.js b/www/js/MonitorModalCtrl.js index e4912294..e51f5af3 100644 --- a/www/js/MonitorModalCtrl.js +++ b/www/js/MonitorModalCtrl.js @@ -1031,6 +1031,10 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ // function configurePTZ(mid) { + $scope.ptzWakeCommand = ""; + $scope.ptzSleepCommand = ""; + $scope.ptzResetCommand = ""; + $scope.ptzMoveCommand = ""; $scope.ptzStopCommand = ""; @@ -1060,6 +1064,21 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ $http.get(myurl) .success(function (data) { + if (data.control.Control.CanWake == '1') + { + $scope.ptzWakeCommand = 'wake'; + } + + if (data.control.Control.CanSleep == '1') + { + $scope.ptzSleepCommand = 'sleep'; + } + + if (data.control.Control.CanReset == '1') + { + $scope.ptzResetCommand = 'reset'; + } + $scope.ptzMoveCommand = "move"; // start with as move; $scope.ptzStopCommand = ""; @@ -1174,4 +1193,4 @@ angular.module('zmApp.controllers').controller('MonitorModalCtrl', ['$scope', '$ }); -}]);
\ No newline at end of file +}]); diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js index 6d93e753..c5ba05bd 100644 --- a/www/js/MontageCtrl.js +++ b/www/js/MontageCtrl.js @@ -664,6 +664,11 @@ function initPackery() $scope.LoginData = ZMDataModel.getLogin(); $rootScope.modalRand = Math.floor(Math.random() * (999999 - 111111 + 1)) + 111111; + + $scope.ptzWakeCommand = ""; + $scope.ptzSleepCommand = ""; + $scope.ptzResetCommand = ""; + $scope.ptzMoveCommand = ""; $scope.ptzStopCommand = ""; @@ -1154,4 +1159,4 @@ $scope.$on('$ionicView.afterEnter', function () { }; -}]);
\ No newline at end of file +}]); |
