结论:新增 LinuxCNC-backed readonly named parameter fixture,依据 interp_namedparams.cc::lookup_named_param 与 init_readonly_param,在 native librs274 与 source-link runner 中验证 #<_metric>/#<_imperial>/#<_absolute>/#<_incremental>/#<_feed>/#<_rpm>/#<_spindle_on>/#<_spindle_cw>;未扩展 smoke,test-native 与 test-linuxcnc-source-link 均通过。
28 lines
360 B
Plaintext
28 lines
360 B
Plaintext
G21 G90 G17
|
|
F100
|
|
O10 if [#<_metric> EQ 1]
|
|
G1 X1
|
|
O10 endif
|
|
G20
|
|
O20 if [#<_imperial> EQ 1]
|
|
G1 Y1
|
|
O20 endif
|
|
G21
|
|
O30 if [#<_absolute> EQ 1]
|
|
G1 Z1
|
|
O30 endif
|
|
G91
|
|
O40 if [#<_incremental> EQ 1]
|
|
G1 X1
|
|
O40 endif
|
|
G90
|
|
F123
|
|
S456 M3
|
|
O50 if [[#<_feed> EQ 123] AND [#<_rpm> EQ 456]]
|
|
G1 Y3
|
|
O50 endif
|
|
O60 if [[#<_spindle_on> EQ 1] AND [#<_spindle_cw> EQ 1]]
|
|
G1 Z2
|
|
O60 endif
|
|
M30
|