按源验证G92单位切换UVW偏置
This commit is contained in:
@@ -1242,14 +1242,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 LinuxCNC G20/G21 G92 restore states: {units_g92_states!r}")
|
||||
|
||||
@@ -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}")
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
G20 G90 G17
|
||||
(Source basis: LinuxCNC src/emc/rs274ngc/interp_convert.cc convert_length_units rescales G92 axis offsets, and convert_axis_offsets restores #5211-#5219 through USER_TO_PROGRAM_LEN and USER_TO_PROGRAM_ANG on G92.3.)
|
||||
G92 X1 Y2 Z3 A4 B5 C6
|
||||
G92 X1 Y2 Z3 A4 B5 C6 U7 V8 W9
|
||||
G21
|
||||
G92.2
|
||||
G92.3
|
||||
|
||||
Reference in New Issue
Block a user