From 068d4a1eb28183e1485f28d7f137dd23b5fdf817 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 28 May 2015 17:44:09 -0700 Subject: [PATCH 1/2] Ignore unknown commands if they start with G, M, or T --- Marlin/Marlin_main.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 4fa3e6584..a4d88e071 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -5301,7 +5301,7 @@ void process_next_command() { gcode_G92(); break; - default: code_is_good = false; + // default: code_is_good = false; } break; @@ -5392,8 +5392,6 @@ void process_next_command() { gcode_M109(); break; - case 110: break; // M110: Set line number - don't show "unknown command" - #if HAS_TEMP_BED case 190: // M190: Wait for bed heater to reach target gcode_M190(); @@ -5735,13 +5733,15 @@ void process_next_command() { gcode_M999(); break; - default: code_is_good = false; + // default: code_is_good = false; } break; case 'T': gcode_T(codenum); break; + + default: code_is_good = false; } ExitUnknownCommand: From 9beed830eb7c99fbe5b901462a9ce098f7d39978 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 28 May 2015 17:53:47 -0700 Subject: [PATCH 2/2] Drop commented code_is_good lines --- Marlin/Marlin_main.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index a4d88e071..6cf61fa94 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -5300,8 +5300,6 @@ void process_next_command() { case 92: // G92 gcode_G92(); break; - - // default: code_is_good = false; } break; @@ -5732,8 +5730,6 @@ void process_next_command() { case 999: // M999: Restart after being Stopped gcode_M999(); break; - - // default: code_is_good = false; } break;