Advance simulation parity and 3-axis tutorial coverage

This commit is contained in:
2026-08-23 18:00:56 +08:00
parent 4a11d9692b
commit 938654b19d
107 changed files with 13537 additions and 3565 deletions

View File

@@ -385,7 +385,8 @@ export class ProgramRunner {
if (motionControl.error) return { status: "error", code: motionControl.error };
this.motionControl = motionControl;
this.state.line += 1;
return { status: "verified", block, state: cloneState(this.state), runner: this.snapshot() };
const interpreterState = cloneState(this.state);
return { status: "verified", block, state: interpreterState, interpreter_state: interpreterState, runner: this.snapshot() };
}
try {
this.ensureMemory();
@@ -396,7 +397,8 @@ export class ProgramRunner {
const stateResult = call(this.core, "sim_interpreter_read_state", "number", ["number", "number"], [this.interpreter, this.stateBuffer]);
if (stateResult !== 0) return { status: "error", code: "mdi_state_read", result: stateResult };
this.state = readInterpreterState(this.core, this.stateBuffer);
return { status: "verified", block, state: cloneState(this.state), runner: this.snapshot() };
const interpreterState = cloneState(this.state);
return { status: "verified", block, state: interpreterState, interpreter_state: interpreterState, runner: this.snapshot() };
} catch (error) {
return { status: "error", code: error.message };
}