Keep long G-code execution running past full planner queue

This commit is contained in:
2026-08-30 06:34:59 +08:00
parent d87366eb75
commit 2d6d8bd1c2
5 changed files with 32 additions and 15 deletions

View File

@@ -44,13 +44,18 @@ assert.equal(send("POWER", { active: true }).kind, "COMMAND_RESULT");
assert.equal(send("HOME", { all: true }).kind, "COMMAND_RESULT");
const run = send("PROGRAM_RUN");
assert.equal(run.kind, "COMMAND_RESULT");
const stepped = send("SIM_STEP", { cycles: 16, response: "motion_delta" });
let stepped = null;
for (let cycle = 0; cycle < 300; cycle += 1) {
stepped = send("SIM_STEP", { cycles: 1, response: "motion_delta" });
assert.equal(stepped.kind, "COMMAND_RESULT");
}
assert.equal(stepped.kind, "COMMAND_RESULT");
assert.equal(stepped.payload.program.program_status, "running");
assert.ok(stepped.payload.program.current_line > 0);
assert.ok(stepped.payload.program.current_line > 82);
assert.ok(stepped.payload.execution_trace.length > 0);
assert.ok(stepped.payload.program.execution_line_text.length > 0);
assert.equal(stepped.payload.motion_authority, "wasm");
assert.equal(Object.hasOwn(stepped.payload.xyzac_ledger.entries.at(-1), "response"), false);
console.log(JSON.stringify({
schema: "xyzac-3d-chips-program.v1",