按源验证G92单位切换UVW偏置

This commit is contained in:
cnc
2026-06-06 08:35:11 +08:00
parent 1d96aa8a55
commit cdc30dda7e
3 changed files with 13 additions and 7 deletions

View File

@@ -1942,14 +1942,17 @@ units_g92_states = [
event["start"]["a"],
event["start"]["b"],
event["start"]["c"],
event["start"]["u"],
event["start"]["v"],
event["start"]["w"],
)
for event in units_g92_restore
if event["type"] == "set-g92-offset" and event["line"] > 0
]
expected_units_g92_states = [
(3, -1, -2, -3, -4, -5, -6),
(5, 0, 0, 0, 0, 0, 0),
(6, -25.4, -50.8, -76.2, -4, -5, -6),
(3, -1, -2, -3, -4, -5, -6, -7, -8, -9),
(5, 0, 0, 0, 0, 0, 0, 0, 0, 0),
(6, -25.4, -50.8, -76.2, -4, -5, -6, -177.8, -203.2, -228.6),
]
if units_g92_states != expected_units_g92_states:
raise SystemExit(f"unexpected source-linked LinuxCNC G20/G21 G92 restore states: {units_g92_states!r}")