|
|
@ -648,7 +648,7 @@ function lococtrl_show(name) {
|
|
|
|
<td><button id=\"lococtrl_"+name+"_btnman\" type=\"button\" value=\"vstop\">MAN</button></td> \
|
|
|
|
<td><button id=\"lococtrl_"+name+"_btnman\" type=\"button\" value=\"vstop\">MAN</button></td> \
|
|
|
|
</tr><tr> \
|
|
|
|
</tr><tr> \
|
|
|
|
<td align=center><input id=\"lococtrl_"+name+"_cbstopman\" type=\"checkbox\" value=\"\" disabled></td>\
|
|
|
|
<td align=center><input id=\"lococtrl_"+name+"_cbstopman\" type=\"checkbox\" value=\"\" disabled></td>\
|
|
|
|
<td><button id=\"lococtrl_"+name+"_btnstopman\" type=\"button\" value=\"vstop\">A⇐M</button></td> \
|
|
|
|
<td><button id=\"lococtrl_"+name+"_btnstopman\" type=\"button\" value=\"vstop\">A⇒M</button></td> \
|
|
|
|
</tr><tr> \
|
|
|
|
</tr><tr> \
|
|
|
|
<td align=center><input id=\"lococtrl_"+name+"_cbauto\" type=\"checkbox\" value=\"\" disabled></td>\
|
|
|
|
<td align=center><input id=\"lococtrl_"+name+"_cbauto\" type=\"checkbox\" value=\"\" disabled></td>\
|
|
|
|
<td><button id=\"lococtrl_"+name+"_btnauto\" type=\"button\" value=\"vstop\">AUTO</button></td> \
|
|
|
|
<td><button id=\"lococtrl_"+name+"_btnauto\" type=\"button\" value=\"vstop\">AUTO</button></td> \
|
|
|
@ -693,6 +693,9 @@ function lococtrl_cb_btnreset() {
|
|
|
|
var name = getTextBetween(this.id, "lococtrl_", "_btnreset");
|
|
|
|
var name = getTextBetween(this.id, "lococtrl_", "_btnreset");
|
|
|
|
var request = { command: "locomotivereset", locomotive: name };
|
|
|
|
var request = { command: "locomotivereset", locomotive: name };
|
|
|
|
serverinout (request, serverinout_defaultCallback);
|
|
|
|
serverinout (request, serverinout_defaultCallback);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
request = { command: "locomotivesetman", locomotive: name };
|
|
|
|
|
|
|
|
serverinout (request, serverinout_defaultCallback);
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -790,6 +793,10 @@ function lococtrl_setData(data) {
|
|
|
|
var cbauto = document.getElementById("lococtrl_"+data.name+"_cbauto");
|
|
|
|
var cbauto = document.getElementById("lococtrl_"+data.name+"_cbauto");
|
|
|
|
var cbrand = document.getElementById("lococtrl_"+data.name+"_cbrand");
|
|
|
|
var cbrand = document.getElementById("lococtrl_"+data.name+"_cbrand");
|
|
|
|
var cbmanstop = document.getElementById("lococtrl_"+data.name+"_cbstopman");
|
|
|
|
var cbmanstop = document.getElementById("lococtrl_"+data.name+"_cbstopman");
|
|
|
|
|
|
|
|
var btnman = document.getElementById("lococtrl_"+data.name+"_btnman");
|
|
|
|
|
|
|
|
var btnautostop = document.getElementById("lococtrl_"+data.name+"_btnstopman");
|
|
|
|
|
|
|
|
var btnauto = document.getElementById("lococtrl_"+data.name+"_btnauto");
|
|
|
|
|
|
|
|
var btnautorand = document.getElementById("lococtrl_"+data.name+"_btnrand");
|
|
|
|
|
|
|
|
|
|
|
|
if (range && reverse) {
|
|
|
|
if (range && reverse) {
|
|
|
|
debug ("lococtrl: " + data.name + " speed:" + data.speed + " vmax:" +
|
|
|
|
debug ("lococtrl: " + data.name + " speed:" + data.speed + " vmax:" +
|
|
|
@ -801,7 +808,26 @@ function lococtrl_setData(data) {
|
|
|
|
cbrand.checked = (data.flags & LOCO_F_RANDOM);
|
|
|
|
cbrand.checked = (data.flags & LOCO_F_RANDOM);
|
|
|
|
cbmanstop.checked = (data.flags & LOCO_F_AUTOSTOP);
|
|
|
|
cbmanstop.checked = (data.flags & LOCO_F_AUTOSTOP);
|
|
|
|
|
|
|
|
|
|
|
|
range.min = 0;
|
|
|
|
if (data.flags & LOCO_F_AUTOSTOP) {
|
|
|
|
|
|
|
|
btnman.disabled = false;
|
|
|
|
|
|
|
|
btnauto.disabled = true;
|
|
|
|
|
|
|
|
btnautorand.disabled = true;
|
|
|
|
|
|
|
|
btnautostop.disabled = true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else if (data.flags & LOCO_F_AUTO) {
|
|
|
|
|
|
|
|
btnman.disabled = true;
|
|
|
|
|
|
|
|
btnautorand.disabled = false;
|
|
|
|
|
|
|
|
btnautostop.disabled = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
else {
|
|
|
|
|
|
|
|
btnman.disabled = true;
|
|
|
|
|
|
|
|
btnautorand.disabled = true;
|
|
|
|
|
|
|
|
btnautostop.disabled = true;
|
|
|
|
|
|
|
|
btnauto.disabled = false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
range.min = 0;
|
|
|
|
if (data.vmax) range.max = data.vmax;
|
|
|
|
if (data.vmax) range.max = data.vmax;
|
|
|
|
range.value = Math.abs(Number(data.speed));
|
|
|
|
range.value = Math.abs(Number(data.speed));
|
|
|
|
}
|
|
|
|
}
|
|
|
|