diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index fb647284cf..9db7d77c90 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -374,8 +374,6 @@ bool pin_is_protected(const int8_t pin) { return false; } -#include "gcode/host/M110.h" - #include "gcode/control/M111.h" #if ENABLED(HOST_KEEPALIVE_FEATURE) diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index c02c2f1e51..822c31786d 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -124,7 +124,6 @@ extern void gcode_M83(); extern void gcode_M85(); extern void gcode_M92(); extern void gcode_M100(); -extern void gcode_M110(); extern void gcode_M111(); extern void gcode_M113(); extern void gcode_M114(); @@ -448,9 +447,7 @@ void GcodeSuite::process_next_command() { case 104: M104(); break; // M104: Set hot end temperature case 109: M109(); break; // M109: Wait for hotend temperature to reach target - case 110: // M110: Set Current Line Number - gcode_M110(); - break; + case 110: M110(); break; // M110: Set Current Line Number case 111: // M111: Set debug level gcode_M111(); diff --git a/Marlin/src/gcode/host/M110.h b/Marlin/src/gcode/host/M110.cpp similarity index 91% rename from Marlin/src/gcode/host/M110.h rename to Marlin/src/gcode/host/M110.cpp index fb584b370b..fc53611d90 100644 --- a/Marlin/src/gcode/host/M110.h +++ b/Marlin/src/gcode/host/M110.cpp @@ -20,11 +20,12 @@ * */ -#include "../queue.h" +#include "../gcode.h" +#include "../queue.h" // for gcode_LastN /** * M110: Set Current Line Number */ -void gcode_M110() { +void GcodeSuite::M110() { if (parser.seenval('N')) gcode_LastN = parser.value_long(); }