diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index f55673646..3459f36c0 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/temperature/M105.h" - #if ENABLED(AUTO_REPORT_TEMPERATURES) && (HAS_TEMP_HOTEND || HAS_TEMP_BED) static uint8_t auto_report_temp_interval; diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 15d3e80f6..fa7a69771 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_M105(); extern void gcode_M106(); extern void gcode_M107(); extern void gcode_M108(); @@ -493,7 +492,7 @@ void GcodeSuite::process_next_command() { case 105: // M105: Report current temperature - gcode_M105(); + M105(); KEEPALIVE_STATE(NOT_BUSY); return; // "ok" already printed diff --git a/Marlin/src/gcode/temperature/M105.h b/Marlin/src/gcode/temperature/M105.cpp similarity index 89% rename from Marlin/src/gcode/temperature/M105.h rename to Marlin/src/gcode/temperature/M105.cpp index 627e991d6..e4417c6af 100644 --- a/Marlin/src/gcode/temperature/M105.h +++ b/Marlin/src/gcode/temperature/M105.cpp @@ -20,11 +20,14 @@ * */ +#include "../gcode.h" +#include "../../module/temperature.h" + /** * M105: Read hot end and bed temperature */ -void gcode_M105() { - if (gcode.get_target_extruder_from_command()) return; +void GcodeSuite::M105() { + if (get_target_extruder_from_command()) return; #if HAS_TEMP_HOTEND || HAS_TEMP_BED SERIAL_PROTOCOLPGM(MSG_OK);