Updates for Ready Mode

This commit is contained in:
David Walsh
2019-04-17 11:26:08 -04:00
parent 5a822a5927
commit 7bea1128df
2 changed files with 28 additions and 4 deletions

View File

@@ -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
}
});