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">
|
<button id="executionModeButton" type="button" onclick="triggerService('/aescape/mode/activateExecutionController')" class="btn btn-primary">
|
||||||
Execution Mode
|
Execution Mode
|
||||||
</button>
|
</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
|
Standby Mode
|
||||||
|
</button>
|
||||||
|
<button id="stoppedModeButton" type="button" onclick="triggerService('/aescape/mode/stopControllers')" class="btn btn-primary">
|
||||||
|
Stopped Mode
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -24,13 +24,17 @@ var modeStatus = new ROSLIB.Topic({
|
|||||||
});
|
});
|
||||||
|
|
||||||
modeStatus.subscribe(function(message) {
|
modeStatus.subscribe(function(message) {
|
||||||
|
document.getElementById("stoppedModeButton").className = "btn btn-secondary"
|
||||||
document.getElementById("standbyModeButton").className = "btn btn-primary"
|
document.getElementById("standbyModeButton").className = "btn btn-primary"
|
||||||
document.getElementById("teachingModeButton").className = "btn btn-primary"
|
document.getElementById("teachingModeButton").className = "btn btn-primary"
|
||||||
document.getElementById("executionModeButton").className = "btn btn-primary"
|
document.getElementById("executionModeButton").className = "btn btn-primary"
|
||||||
|
|
||||||
|
|
||||||
if (message.data === "standby") {
|
if (message.data === "stopped") {
|
||||||
document.getElementById("standbyModeButton").className = "btn btn-success"
|
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")
|
} else if (message.data === "teach")
|
||||||
{
|
{
|
||||||
document.getElementById("teachingModeButton").className = "btn btn-primary btn-success"
|
document.getElementById("teachingModeButton").className = "btn btn-primary btn-success"
|
||||||
|
|||||||
Reference in New Issue
Block a user