Added standby mode.

This commit is contained in:
David Walsh
2019-03-24 23:52:04 -04:00
parent ef335863c9
commit 39ebd35247
2 changed files with 10 additions and 3 deletions

View File

@@ -10,8 +10,11 @@
<button id="executionModeButton" type="button" onclick="triggerService('/aescape/mode/activateExecutionController')" class="btn btn-primary">
Execution Mode
</button>
<button id="standbyModeButton" type="button" onclick="triggerService('/aescape/mode/stopControllers')" class="btn btn-primary">
<button id="standbyModeButton" type="button" onclick="triggerService('/aescape/mode/activateStandbyController')" class="btn btn-primary">
Standby Mode
</button>
<button id="stoppedModeButton" type="button" onclick="triggerService('/aescape/mode/stopControllers')" class="btn btn-primary">
Stopped Mode
</button>
</div>
</div>

View File

@@ -24,13 +24,17 @@ 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("teachingModeButton").className = "btn btn-primary"
document.getElementById("executionModeButton").className = "btn btn-primary"
if (message.data === "standby") {
document.getElementById("standbyModeButton").className = "btn btn-success"
if (message.data === "stopped") {
document.getElementById("stoppedModeButton").className = "btn btn-warning"
} else if (message.data === "standby")
{
document.getElementById("standbyModeButton").className = "btn btn-primary btn-success"
} else if (message.data === "teach")
{
document.getElementById("teachingModeButton").className = "btn btn-primary btn-success"