对齐 gmoccapy XYZAB 模式互锁
This commit is contained in:
@@ -218,6 +218,12 @@ function gateMode(status, requestedMode) {
|
||||
if (status.taskMode === "auto" && status.interpState !== "idle" && targetMode !== "auto") {
|
||||
return block(status, "mode blocked: AUTO interpreter is not idle");
|
||||
}
|
||||
if (status.taskState !== "on") {
|
||||
return block(status, `mode blocked: machine must be on before ${targetMode.toUpperCase()}`);
|
||||
}
|
||||
if ((targetMode === "mdi" || targetMode === "auto") && !status.allHomed && !status.noForceHoming) {
|
||||
return block(status, `mode blocked: home machine before ${targetMode.toUpperCase()}`);
|
||||
}
|
||||
return allow(status);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user