diff --git a/Marlin/src/Marlin.cpp b/Marlin/src/Marlin.cpp index 195a8700c..a249f60a4 100644 --- a/Marlin/src/Marlin.cpp +++ b/Marlin/src/Marlin.cpp @@ -357,10 +357,6 @@ void suicide() { ***************** GCode Handlers ***************** **************************************************/ -#if ENABLED(Z_PROBE_SLED) - #include "gcode/probe/G31_G32.h" -#endif - #if ENABLED(G38_PROBE_TARGET) #include "gcode/probe/G38.h" #endif diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index ab94884cc..947b3dd71 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -116,8 +116,6 @@ void GcodeSuite::dwell(millis_t time) { // // Placeholders for non-migrated codes // -extern void gcode_G31(); -extern void gcode_G32(); extern void gcode_G38(bool is_38_2); extern void gcode_G42(); extern void gcode_G92(); @@ -367,11 +365,11 @@ void GcodeSuite::process_next_command() { #if ENABLED(Z_PROBE_SLED) case 31: // G31: dock the sled - gcode_G31(); + G31(); break; case 32: // G32: undock the sled - gcode_G32(); + G32(); break; #endif // Z_PROBE_SLED diff --git a/Marlin/src/gcode/probe/G31_G32.h b/Marlin/src/gcode/probe/G31_G32.cpp similarity index 80% rename from Marlin/src/gcode/probe/G31_G32.h rename to Marlin/src/gcode/probe/G31_G32.cpp index 280226b5c..751efca5b 100644 --- a/Marlin/src/gcode/probe/G31_G32.h +++ b/Marlin/src/gcode/probe/G31_G32.cpp @@ -20,12 +20,21 @@ * */ +#include "../../inc/MarlinConfig.h" + +#if ENABLED(Z_PROBE_SLED) + +#include "../gcode.h" +#include "../../module/probe.h" + /** * G31: Deploy the Z probe */ -void gcode_G31() { DEPLOY_PROBE(); } +void GcodeSuite::G31() { DEPLOY_PROBE(); } /** * G32: Stow the Z probe */ -void gcode_G32() { STOW_PROBE(); } +void GcodeSuite::G32() { STOW_PROBE(); } + +#endif // Z_PROBE_SLED