From 2e1939e85c7f4a796b58456abe189765addd8b7d Mon Sep 17 00:00:00 2001 From: Giuliano <3684609+GMagician@users.noreply.github.com> Date: Sat, 28 Apr 2018 00:40:27 +0200 Subject: [PATCH] [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 --- Marlin/src/gcode/gcode.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 4416425270..3a24f62479 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -277,6 +277,8 @@ void GcodeSuite::process_parsed_command( #if ENABLED(DEBUG_GCODE_PARSER) case 800: parser.debug(); break; // G800: GCode Parser Test for G #endif + + default: parser.unknown_command_error(); break; } break; @@ -655,6 +657,8 @@ void GcodeSuite::process_parsed_command( #endif case 999: M999(); break; // M999: Restart after being Stopped + + default: parser.unknown_command_error(); break; } break;