Enforce LinuxCNC WASM XYZAC command authority

This commit is contained in:
2026-08-28 13:04:47 +08:00
parent 1a7995fa9b
commit 78d884bc67
43 changed files with 567 additions and 186 deletions

View File

@@ -23,6 +23,7 @@ assert.equal(loaded.payload.status, "verified");
assert.equal(loaded.payload.panel_snapshot.io.source, "wasm_io");
assert.equal(loaded.payload.panel_snapshot.device_io.source, "wasm_device_io");
assert.equal(loaded.payload.panel_snapshot.hal.runtime.source, "wasm_hal");
assert.equal(send("POWER", "power-on", { active: true }).payload.status, "verified");
const spindle = send("SPINDLE_COMMAND", "spindle-on", { spindle: 0, rpm: 1200, enabled: true });
assert.equal(spindle.kind, "COMMAND_RESULT");
@@ -46,7 +47,8 @@ const estop = send("ESTOP", "io-estop", { active: true });
assert.equal(estop.payload.device_io.source, "wasm_io");
const blocked = send("SPINDLE_COMMAND", "spindle-blocked", { spindle: 0, rpm: 500, enabled: true });
assert.equal(blocked.kind, "ERROR");
assert.equal(send("IO_RECOVER", "io-recover").payload.device_io.source, "wasm_io");
assert.equal(send("ESTOP", "io-estop-reset", { active: false }).payload.panel_snapshot.axis_state.machine_state, "ESTOP_RESET");
assert.equal(send("POWER", "power-on-after-estop", { active: true }).payload.device_io.source, "wasm_io");
const firstHash = send("SNAPSHOT_REQUEST", "snapshot-a").payload.panel_snapshot.device_io.projection_hash;
const secondHash = send("SNAPSHOT_REQUEST", "snapshot-b").payload.panel_snapshot.device_io.projection_hash;
assert.equal(firstHash, secondHash);