Make machine configuration authoritative and restore native checkpoints exactly
This commit is contained in:
@@ -31,4 +31,14 @@ assert.equal(axisGate("overrideLimits", limit).enabled, true);
|
||||
assert.equal(axisGateMatrix(ready).run.reason, "axis_run_available");
|
||||
assert.equal(AXIS_COMMANDS.run, "PROGRAM_RUN");
|
||||
assert.equal(AXIS_BOUNDARIES.physicalHardware, "REAL-EXCLUDED");
|
||||
for (const action of ["tool", "toolPrepare", "toolChange"]) {
|
||||
assert.equal(axisGate(action, ready).enabled, true);
|
||||
assert.equal(axisGate(action, running).enabled, false);
|
||||
assert.equal(axisGate(action, paused).enabled, false);
|
||||
assert.equal(axisGate(action, estop).enabled, false);
|
||||
assert.equal(axisGate(action, { ...ready, task: { ...ready.task, state: "OFF" } }).enabled, false);
|
||||
assert.equal(axisGate(action, { ...ready, motion: { ...ready.motion, queue_depth: 1 } }).reason, "axis_motion_active");
|
||||
assert.equal(axisGate(action, { ...ready, devices: { fault: true } }).reason, "axis_fault_active");
|
||||
assert.equal(axisGate(action, { ...ready, task: { ...ready.task, mode: "AUTO" } }).enabled, false);
|
||||
}
|
||||
console.log(JSON.stringify({ schema: "axis-contract-sample.v1", status: "verified", commands: Object.keys(AXIS_COMMANDS).length, matrix: Object.keys(axisGateMatrix(ready)).length, blocked_reasons: [axisGate("mdi", queueFull).reason, axisGate("jogStart", estop).reason] }));
|
||||
|
||||
Reference in New Issue
Block a user