From c932e108012e8daea05c6aa3e8dbb148412aa183 Mon Sep 17 00:00:00 2001 From: cnc Date: Wed, 3 Jun 2026 09:41:26 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8F=82=E8=80=83=E6=89=80=E6=9C=89=E5=88=86?= =?UTF-8?q?=E7=BB=84=EF=BC=9A=E8=A1=A5=20modal=20group=20source=20?= =?UTF-8?q?=E8=A6=86=E7=9B=96=EF=BC=8C=E6=B5=8B=E8=AF=95=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test-linuxcnc-rs274-native.sh | 9 +++++++++ test-linuxcnc-source-link.sh | 9 +++++++++ tests/gcode/linuxcnc_g4_negative_p_error.ngc | 2 ++ tests/gcode/linuxcnc_same_modal_control_mode_error.ngc | 2 ++ tests/gcode/linuxcnc_same_modal_g10_g92_error.ngc | 2 ++ tests/gcode/linuxcnc_same_modal_g4_g53_error.ngc | 2 ++ tests/gcode/linuxcnc_same_modal_g52_g92_error.ngc | 2 ++ tests/gcode/linuxcnc_same_modal_g921_g922_error.ngc | 2 ++ .../linuxcnc_same_modal_predefined_position_error.ngc | 2 ++ tests/gcode/linuxcnc_same_modal_probe_motion_error.ngc | 3 +++ .../gcode/linuxcnc_same_modal_threading_motion_error.ngc | 4 ++++ 11 files changed, 39 insertions(+) create mode 100644 tests/gcode/linuxcnc_g4_negative_p_error.ngc create mode 100644 tests/gcode/linuxcnc_same_modal_control_mode_error.ngc create mode 100644 tests/gcode/linuxcnc_same_modal_g10_g92_error.ngc create mode 100644 tests/gcode/linuxcnc_same_modal_g4_g53_error.ngc create mode 100644 tests/gcode/linuxcnc_same_modal_g52_g92_error.ngc create mode 100644 tests/gcode/linuxcnc_same_modal_g921_g922_error.ngc create mode 100644 tests/gcode/linuxcnc_same_modal_predefined_position_error.ngc create mode 100644 tests/gcode/linuxcnc_same_modal_probe_motion_error.ngc create mode 100644 tests/gcode/linuxcnc_same_modal_threading_motion_error.ngc diff --git a/test-linuxcnc-rs274-native.sh b/test-linuxcnc-rs274-native.sh index 9f03c02..ce1bfc2 100755 --- a/test-linuxcnc-rs274-native.sh +++ b/test-linuxcnc-rs274-native.sh @@ -213,6 +213,7 @@ done # before convert_g() executes motion or coordinate updates. check_g_code_error_cases=( "linuxcnc_g4_missing_p_error|Dwell time missing with g4" + "linuxcnc_g4_negative_p_error|Dwell time missing with g4" "linuxcnc_g4_arc_p_conflict_error|G4 not allowed with G2 or G3 because they both use P" "linuxcnc_g10_invalid_l_error|Line with G10 does not have L0, L1, L10, L11, L2, or L20" "linuxcnc_g10_p_non_integer_error|P value not an integer with G10" @@ -268,6 +269,14 @@ gm_reader_error_cases=( "linuxcnc_g_code_out_of_range_error|G-code out of range" "linuxcnc_unknown_g_code_error|Unknown g code used" "linuxcnc_two_g_codes_same_modal_group_error|Two g codes used from same modal group" + "linuxcnc_same_modal_predefined_position_error|Two g codes used from same modal group" + "linuxcnc_same_modal_g52_g92_error|Two g codes used from same modal group" + "linuxcnc_same_modal_g10_g92_error|Two g codes used from same modal group" + "linuxcnc_same_modal_control_mode_error|Two g codes used from same modal group" + "linuxcnc_same_modal_g4_g53_error|Two g codes used from same modal group" + "linuxcnc_same_modal_g921_g922_error|Two g codes used from same modal group" + "linuxcnc_same_modal_threading_motion_error|Two g codes used from same modal group" + "linuxcnc_same_modal_probe_motion_error|Two g codes used from same modal group" "linuxcnc_m_code_greater_199_error|M-code greater than 199: M200" "linuxcnc_unknown_m_code_error|Unknown m code used: M13" "linuxcnc_two_m_codes_same_modal_group_error|Two m codes used from same modal group" diff --git a/test-linuxcnc-source-link.sh b/test-linuxcnc-source-link.sh index 3e1aec5..a19d403 100755 --- a/test-linuxcnc-source-link.sh +++ b/test-linuxcnc-source-link.sh @@ -657,6 +657,7 @@ done # before convert_g() executes motion or coordinate updates. check_g_code_error_cases=( "linuxcnc_g4_missing_p_error|Dwell time missing with g4" + "linuxcnc_g4_negative_p_error|Dwell time missing with g4" "linuxcnc_g4_arc_p_conflict_error|G4 not allowed with G2 or G3 because they both use P" "linuxcnc_g10_invalid_l_error|Line with G10 does not have L0, L1, L10, L11, L2, or L20" "linuxcnc_g10_p_non_integer_error|P value not an integer with G10" @@ -944,6 +945,14 @@ gm_reader_error_cases=( "linuxcnc_g_code_out_of_range_error|G-code out of range" "linuxcnc_unknown_g_code_error|Unknown g code used" "linuxcnc_two_g_codes_same_modal_group_error|Two g codes used from same modal group" + "linuxcnc_same_modal_predefined_position_error|Two g codes used from same modal group" + "linuxcnc_same_modal_g52_g92_error|Two g codes used from same modal group" + "linuxcnc_same_modal_g10_g92_error|Two g codes used from same modal group" + "linuxcnc_same_modal_control_mode_error|Two g codes used from same modal group" + "linuxcnc_same_modal_g4_g53_error|Two g codes used from same modal group" + "linuxcnc_same_modal_g921_g922_error|Two g codes used from same modal group" + "linuxcnc_same_modal_threading_motion_error|Two g codes used from same modal group" + "linuxcnc_same_modal_probe_motion_error|Two g codes used from same modal group" "linuxcnc_m_code_greater_199_error|M-code greater than 199: M200" "linuxcnc_unknown_m_code_error|Unknown m code used: M13" "linuxcnc_two_m_codes_same_modal_group_error|Two m codes used from same modal group" diff --git a/tests/gcode/linuxcnc_g4_negative_p_error.ngc b/tests/gcode/linuxcnc_g4_negative_p_error.ngc new file mode 100644 index 0000000..b9e50ee --- /dev/null +++ b/tests/gcode/linuxcnc_g4_negative_p_error.ngc @@ -0,0 +1,2 @@ +G21 G90 +G4 P-1 diff --git a/tests/gcode/linuxcnc_same_modal_control_mode_error.ngc b/tests/gcode/linuxcnc_same_modal_control_mode_error.ngc new file mode 100644 index 0000000..4484b53 --- /dev/null +++ b/tests/gcode/linuxcnc_same_modal_control_mode_error.ngc @@ -0,0 +1,2 @@ +G21 G90 +G61 G64 diff --git a/tests/gcode/linuxcnc_same_modal_g10_g92_error.ngc b/tests/gcode/linuxcnc_same_modal_g10_g92_error.ngc new file mode 100644 index 0000000..948f2ed --- /dev/null +++ b/tests/gcode/linuxcnc_same_modal_g10_g92_error.ngc @@ -0,0 +1,2 @@ +G21 G90 +G10 L2 P1 X1 G92 Y0 diff --git a/tests/gcode/linuxcnc_same_modal_g4_g53_error.ngc b/tests/gcode/linuxcnc_same_modal_g4_g53_error.ngc new file mode 100644 index 0000000..7541a35 --- /dev/null +++ b/tests/gcode/linuxcnc_same_modal_g4_g53_error.ngc @@ -0,0 +1,2 @@ +G21 G90 +G4 P0 G53 G0 X0 diff --git a/tests/gcode/linuxcnc_same_modal_g52_g92_error.ngc b/tests/gcode/linuxcnc_same_modal_g52_g92_error.ngc new file mode 100644 index 0000000..8f25f42 --- /dev/null +++ b/tests/gcode/linuxcnc_same_modal_g52_g92_error.ngc @@ -0,0 +1,2 @@ +G21 G90 +G52 X1 G92 Y0 diff --git a/tests/gcode/linuxcnc_same_modal_g921_g922_error.ngc b/tests/gcode/linuxcnc_same_modal_g921_g922_error.ngc new file mode 100644 index 0000000..7f1accb --- /dev/null +++ b/tests/gcode/linuxcnc_same_modal_g921_g922_error.ngc @@ -0,0 +1,2 @@ +G21 G90 +G92.1 G92.2 diff --git a/tests/gcode/linuxcnc_same_modal_predefined_position_error.ngc b/tests/gcode/linuxcnc_same_modal_predefined_position_error.ngc new file mode 100644 index 0000000..9af0371 --- /dev/null +++ b/tests/gcode/linuxcnc_same_modal_predefined_position_error.ngc @@ -0,0 +1,2 @@ +G21 G90 +G28 G30 diff --git a/tests/gcode/linuxcnc_same_modal_probe_motion_error.ngc b/tests/gcode/linuxcnc_same_modal_probe_motion_error.ngc new file mode 100644 index 0000000..c87d2d0 --- /dev/null +++ b/tests/gcode/linuxcnc_same_modal_probe_motion_error.ngc @@ -0,0 +1,3 @@ +G21 G90 +F100 +G38.2 Z1 G38.3 diff --git a/tests/gcode/linuxcnc_same_modal_threading_motion_error.ngc b/tests/gcode/linuxcnc_same_modal_threading_motion_error.ngc new file mode 100644 index 0000000..ce38bd6 --- /dev/null +++ b/tests/gcode/linuxcnc_same_modal_threading_motion_error.ngc @@ -0,0 +1,4 @@ +G21 G90 +F100 +S100 M3 +G33 Z0 K1 G33.1