From 7c05ffe1f5665ca17513343fa5cfb7cb16673f7b Mon Sep 17 00:00:00 2001 From: Arjun Roychowdhury Date: Thu, 24 Dec 2015 07:19:04 -0500 Subject: #121 - added a stop button - not really tested... Former-commit-id: 5e2ddcc44e9d4a282eae4ec6e2cd174b983371ea --- www/js/MonitorCtrl.js | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'www/js/MonitorCtrl.js') diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js index dc24c4ae..7fcb8dac 100644 --- a/www/js/MonitorCtrl.js +++ b/www/js/MonitorCtrl.js @@ -312,18 +312,27 @@ angular.module('zmApp.controllers') .success(function (data) { $scope.ptzMoveCommand = "move"; // start with as move; + $scope.ptzStopCommand = ""; if (data.control.Control.CanMoveRel == '1') + { $scope.ptzMoveCommand = "moveRel"; + $scope.ptzStopCommand = "moveStop"; + } // Prefer con over rel if both enabled // I've tested con if (data.control.Control.CanMoveCon == '1') + { $scope.ptzMoveCommand = "moveCon"; + $scope.ptzStopCommand = "moveStop"; + } + + console.log("***moveCommand: " + $scope.ptzMoveCommand); - ZMDataModel.zmLog("ControlDB reports PTZ command to be " + $scope.ptzMoveCommand); + ZMDataModel.zmLog("ControlDB reports PTZ command to be " + $scope.ptzMoveCommand + " and " + $scope.ptzStopCommand); }) .error(function (data) { console.log("** Error retrieving move PTZ command"); -- cgit v1.2.3