Browse Source

[2.0.x] report error on unsupported commands (#10553)

Raise an error when an unknown/unsupported G/M command is requires.

This will address #10546
Giuliano 6 years ago
parent
commit
2e1939e85c
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      Marlin/src/gcode/gcode.cpp

+ 4
- 0
Marlin/src/gcode/gcode.cpp View File

@@ -277,6 +277,8 @@ void GcodeSuite::process_parsed_command(
277 277
       #if ENABLED(DEBUG_GCODE_PARSER)
278 278
         case 800: parser.debug(); break;                          // G800: GCode Parser Test for G
279 279
       #endif
280
+
281
+      default: parser.unknown_command_error(); break;
280 282
     }
281 283
     break;
282 284
 
@@ -655,6 +657,8 @@ void GcodeSuite::process_parsed_command(
655 657
       #endif
656 658
 
657 659
       case 999: M999(); break;                                    // M999: Restart after being Stopped
660
+
661
+      default: parser.unknown_command_error(); break;
658 662
     }
659 663
     break;
660 664
 

Loading…
Cancel
Save