From 109e67169c75d1b58b761725d1a568ae7f42e638 Mon Sep 17 00:00:00 2001 From: Marcio Teixeira Date: Fri, 22 Feb 2019 14:35:32 -0700 Subject: [PATCH] Define G21 as NOOP w/o INCH_MODE_SUPPORT (#13229) Ticket #13228 If `INCH_MODE_SUPPORT` is undefined, G20 is an unknown command as it should be (Marlin is, by default, operating in metric mode). G21, however, is found in many slicers and printer start gcode sections and should be accepted (as a NOOP) to avoid the unknown commands. --- Marlin/src/gcode/gcode.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 4b0a859943..0df31176c0 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -206,6 +206,8 @@ void GcodeSuite::process_parsed_command( #if ENABLED(INCH_MODE_SUPPORT) case 20: G20(); break; // G20: Inch Mode case 21: G21(); break; // G21: MM Mode + #else + case 21: NOOP; break; // No error on unknown G21 #endif #if ENABLED(G26_MESH_VALIDATION)