验证 G92 禁用持久化

提示词:快速推进,非纯 source-map-only,保留源依据、自动测试、本地提交且不自动推送。

结论:基于 LinuxCNC rs274ngc_pre.cc 的 DISABLE_G92_PERSISTENCE 初始化清理和 interp_convert.cc convert_stop 的 M30 清理逻辑,新增 INI/G-code fixture 并接入 native/source-link 参数持久化断言;./test-native.sh 和 ./test-linuxcnc-source-link.sh 通过。
This commit is contained in:
cnc
2026-06-06 06:38:42 +08:00
parent 586c28656d
commit 5aa328b413
6 changed files with 90 additions and 0 deletions

View File

@@ -0,0 +1,2 @@
[RS274NGC]
DISABLE_G92_PERSISTENCE = 1

View File

@@ -0,0 +1,7 @@
G21 G90 G17
F100
(Source basis: LinuxCNC src/emc/rs274ngc/interp_convert.cc convert_stop clears persisted G92/G52 parameters on program end.)
O10 if [[#5210 EQ 0] AND [#5211 EQ 0] AND [#5212 EQ 0] AND [#5213 EQ 0]]
G1 X1
O10 endif
M30

View File

@@ -0,0 +1,4 @@
G21 G90 G17
(Source basis: LinuxCNC src/emc/rs274ngc/interp_convert.cc convert_stop clears #5210-#5219 when DISABLE_G92_PERSISTENCE is enabled.)
G92 X4 Y5 Z6
M30

View File

@@ -0,0 +1,7 @@
G21 G90 G17
F100
(Source basis: LinuxCNC src/emc/rs274ngc/rs274ngc_pre.cc init clears restored #5210-#5219 when DISABLE_G92_PERSISTENCE is enabled.)
O10 if [[#5210 EQ 0] AND [#5211 EQ 0] AND [#5212 EQ 0] AND [#5213 EQ 0]]
G1 X2
O10 endif
M30