Added standby mode.
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user