From 7bea1128df653829f3b30b5c26518f2fe1b7642c Mon Sep 17 00:00:00 2001 From: David Walsh Date: Wed, 17 Apr 2019 11:26:08 -0400 Subject: [PATCH] Updates for Ready Mode --- coordinator/coordinator.html | 9 +++++++++ coordinator/js/ros_scripts.js | 23 +++++++++++++++++++---- 2 files changed, 28 insertions(+), 4 deletions(-) diff --git a/coordinator/coordinator.html b/coordinator/coordinator.html index 7a482b9..40eae11 100644 --- a/coordinator/coordinator.html +++ b/coordinator/coordinator.html @@ -10,6 +10,9 @@ + @@ -89,6 +92,9 @@ Bag manager not connected! + @@ -117,6 +123,9 @@ None
+ diff --git a/coordinator/js/ros_scripts.js b/coordinator/js/ros_scripts.js index f761d76..8a8a335 100644 --- a/coordinator/js/ros_scripts.js +++ b/coordinator/js/ros_scripts.js @@ -27,22 +27,37 @@ var modeStatus = new ROSLIB.Topic({ modeStatus.subscribe(function(message) { document.getElementById("stoppedModeButton").className = "btn btn-secondary" document.getElementById("standbyModeButton").className = "btn btn-primary" + document.getElementById("readyModeButton").className = "btn btn-primary" document.getElementById("teachingModeButton").className = "btn btn-primary" document.getElementById("executionModeButton").className = "btn btn-primary" + + document.getElementById("recordingStartButton").disabled = true + document.getElementById("executionStartButton").disabled = true - if (message.data == "stopped") { + + if (message.data == "stopped") + { document.getElementById("stoppedModeButton").className = "btn btn-warning" - } else if (message.data == "standby") + } + else if (message.data == "standby") { document.getElementById("standbyModeButton").className = "btn btn-primary btn-success" - } else if (message.data == "teach") + } + else if (message.data == "teach") { document.getElementById("teachingModeButton").className = "btn btn-primary btn-success" - } else if (message.data == "execution") + } + else if (message.data == "execution") { document.getElementById("executionModeButton").className = "btn btn-primary btn-success" } + else if (message.data == "ready") + { + document.getElementById("readyModeButton").className = "btn btn-primary btn-success" + document.getElementById("recordingStartButton").disabled = false + document.getElementById("executionStartButton").disabled = false + } });