Unblock native XYZAC TP oracle

This commit is contained in:
2026-08-31 20:08:00 +08:00
parent 18436149a2
commit 6015293ee9
17 changed files with 49339 additions and 61 deletions

View File

@@ -1436,6 +1436,13 @@ export class SimSession {
}
const step = this.xyzacProgram.step();
if (step.status !== "verified") throw new Error(step.code);
// Path control is produced by the WASM interpreter and applied
// to the WASM trajectory queue before the block's motion is
// enqueued. G61/G61.1 conservatively use the queue's exact
// profile; G64 restores the continuous lookahead profile.
const motionControlMode = Number(step.program?.motion_control_mode ?? 0);
const queueProfile = motionControlMode === 0 ? 0 : 1;
if (this.wasmMotion.controls.profile !== queueProfile) this.wasmMotion.setProfile(queueProfile);
if (step.has_control && [428, 429, 430].includes(step.control_code)) {
this.pendingProgramControl = step.control_code;
if (this.wasmMotion.read().state.queue_depth === 0) {