Align Web XYZAC command gates with LinuxCNC

This commit is contained in:
2026-08-28 21:33:11 +08:00
parent 78d884bc67
commit cbd0bc1003
30 changed files with 337 additions and 150 deletions

View File

@@ -170,6 +170,12 @@ export class SimTask {
this.lastError = 0;
}
commandGate(command, { requested = 0, ioReady = false, ioEstop = false, homed = false, queueDepth = 0, queueLimit = 10 } = {}) {
this.ensureCore();
if (!this.coreTask || (typeof this.core?._sim_task_command_gate !== "function" && typeof this.core?.sim_task_command_gate !== "function")) return null;
return coreCall(this.core, "sim_task_command_gate", "number", ["number", "number", "number", "number", "number", "number", "number", "number"], [this.coreTask, command, requested, ioReady ? 1 : 0, ioEstop ? 1 : 0, homed ? 1 : 0, queueDepth, queueLimit]);
}
export() {
this.syncFromCore();
const unsigned = clone(this.state);