summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/js/MonitorCtrl.js5
-rw-r--r--www/js/MontageCtrl.js26
2 files changed, 28 insertions, 3 deletions
diff --git a/www/js/MonitorCtrl.js b/www/js/MonitorCtrl.js
index fc0956e2..013c9e79 100644
--- a/www/js/MonitorCtrl.js
+++ b/www/js/MonitorCtrl.js
@@ -322,17 +322,22 @@ angular.module('zmApp.controllers')
$scope.ptzMoveCommand = "move"; // start with as move;
$scope.ptzStopCommand = "";
+ ZMDataModel.zmDebug ("control PTZ details are " + JSON.stringify(data));
+
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";
}
diff --git a/www/js/MontageCtrl.js b/www/js/MontageCtrl.js
index 2cd606c0..eb4358e5 100644
--- a/www/js/MontageCtrl.js
+++ b/www/js/MontageCtrl.js
@@ -667,10 +667,30 @@ function initPackery()
$http.get(myurl)
.success(function (data) {
+
+ $scope.ptzMoveCommand = "move"; // start with as move;
+ $scope.ptzStopCommand = "";
+
+
ZMDataModel.zmDebug("MontageCtrl: control data returned " + JSON.stringify(data));
- $scope.ptzMoveCommand = (data.control.Control.CanMoveCon == '1') ? 'moveCon' : 'move';
- $scope.ptzStopCommand = "moveStop";
- //console.log("***moveCommand: " + $scope.ptzMoveCommand);
+
+ 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";
+ }
+
// presets