对齐 gmoccapy XYZAB 模式互锁

This commit is contained in:
2026-06-26 18:19:49 -04:00
parent 0664ea9bd7
commit 544bfd4b4b
13 changed files with 591 additions and 6 deletions

View File

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