Align AXIS control flow and fix pause and program rendering
Document source UI gates, explicit native live-plot clearing, and remaining parity boundaries. Fix pause/resume transport continuity, repeated stepping, coordinate previews, and spindle override state. Optimize large program snapshots and rendering, and cover the control flows with native Tcl, WASM, and browser checks. Validation: 22 native tests and source/browser checks pass. Worker/App regression: 113 of 123 pass; 10 pre-existing failures remain documented with no new failures.
This commit is contained in:
@@ -23,7 +23,7 @@ function setup(id, { homeAll = true } = {}) {
|
||||
|
||||
const partialHome = setup("xyzac-manual-partial-home", { homeAll: false });
|
||||
for (const [index, axis] of ["x", "y", "z", "a", "c"].entries()) {
|
||||
const response = partialHome.send("HOME", `home-${axis}`, { axis });
|
||||
const response = partialHome.send("HOME", `home-${axis}`, { joint: index });
|
||||
assert.equal(response.payload.wasm_home_limit.state.homed_mask, (1 << (index + 1)) - 1);
|
||||
assert.equal(response.payload.wasm_home_limit.state.homed, index === 4);
|
||||
}
|
||||
@@ -60,15 +60,22 @@ assert.equal(ferror.kind, "ERROR");
|
||||
assert.equal(ferror.payload.code, "motion_following_error");
|
||||
|
||||
const mdiCase = setup("xyzac-manual-mdi");
|
||||
const mdi = mdiCase.send("MDI_EXECUTE", "mdi-xyzac", { block: "G21 G90 G1 X10 Y5 Z180 A30 C45 F100" });
|
||||
// The selected INI limits Z to [-120, 120]; use an in-range completion case.
|
||||
const mdi = mdiCase.send("MDI_EXECUTE", "mdi-xyzac", { block: "G21 G90 G1 X10 Y5 Z18 A30 C45 F600" });
|
||||
assert.equal(mdi.kind, "COMMAND_RESULT");
|
||||
assert.equal(mdi.payload.motion_authority, "wasm");
|
||||
assert.equal(mdi.payload.program.source, "linuxcnc-wasm-sim_program");
|
||||
assert.equal(mdi.payload.panel_snapshot.kinematics.active_type, 0);
|
||||
const invalidMdi = mdiCase.send("MDI_EXECUTE", "mdi-invalid", { block: "G999" });
|
||||
assert.equal(invalidMdi.kind, "ERROR");
|
||||
assert.equal(invalidMdi.payload.gate_reason, "mdi_while_program_active");
|
||||
for (let tick = 0; tick < 20000 && mdiCase.session.wasmMotion.read().state.queue_depth > 0; tick += 32) {
|
||||
const sample = mdiCase.send("SIM_STEP", `mdi-drain-${tick}`, { cycles: 32, response: "motion_delta" });
|
||||
assert.equal(sample.kind, "COMMAND_RESULT", sample.payload.message_key);
|
||||
}
|
||||
assert.equal(mdiCase.session.wasmMotion.read().state.queue_depth, 0);
|
||||
const loaded = mdiCase.send("PROGRAM_LOAD", "mdi-program", { source: "G21 G90\nG1 X20 A10 C20 F100\nM2\n", path: "mdi-run.ngc" });
|
||||
assert.equal(loaded.kind, "COMMAND_RESULT");
|
||||
assert.equal(loaded.kind, "COMMAND_RESULT", JSON.stringify({ reason: loaded.payload.gate_reason ?? loaded.payload.message_key, code: loaded.payload.code, preview: loaded.payload.preview, program: loaded.payload.program?.program_status }));
|
||||
mdiCase.send("PROGRAM_RUN", "mdi-run");
|
||||
const mdiWhileRunning = mdiCase.send("MDI_EXECUTE", "mdi-running", { block: "G0 X1" });
|
||||
assert.equal(mdiWhileRunning.kind, "ERROR");
|
||||
|
||||
Reference in New Issue
Block a user