diff --git a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp index 8a1cb40c3..0f6f0008a 100644 --- a/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp +++ b/Marlin/src/feature/bedlevel/ubl/ubl_G29.cpp @@ -756,7 +756,7 @@ STOW_PROBE(); - #if Z_AFTER_PROBING + #ifdef Z_AFTER_PROBING move_z_after_probing(); #endif diff --git a/Marlin/src/gcode/bedlevel/abl/G29.cpp b/Marlin/src/gcode/bedlevel/abl/G29.cpp index 4d6206c6a..c37c5e790 100644 --- a/Marlin/src/gcode/bedlevel/abl/G29.cpp +++ b/Marlin/src/gcode/bedlevel/abl/G29.cpp @@ -965,7 +965,7 @@ void GcodeSuite::G29() { if (planner.leveling_active) SYNC_PLAN_POSITION_KINEMATIC(); - #if HAS_BED_PROBE && Z_AFTER_PROBING + #if HAS_BED_PROBE && defined(Z_AFTER_PROBING) move_z_after_probing(); #endif diff --git a/Marlin/src/gcode/calibrate/G28.cpp b/Marlin/src/gcode/calibrate/G28.cpp index 510262bd0..043179c93 100644 --- a/Marlin/src/gcode/calibrate/G28.cpp +++ b/Marlin/src/gcode/calibrate/G28.cpp @@ -312,7 +312,7 @@ void GcodeSuite::G28(const bool always_home_all) { HOMEAXIS(Z); #endif - #if HOMING_Z_WITH_PROBE && Z_AFTER_PROBING + #if HOMING_Z_WITH_PROBE && defined(Z_AFTER_PROBING) move_z_after_probing(); #endif diff --git a/Marlin/src/gcode/probe/G30.cpp b/Marlin/src/gcode/probe/G30.cpp index 441505441..8a3590e5a 100644 --- a/Marlin/src/gcode/probe/G30.cpp +++ b/Marlin/src/gcode/probe/G30.cpp @@ -62,7 +62,7 @@ void GcodeSuite::G30() { clean_up_after_endstop_or_probe_move(); - #if Z_AFTER_PROBING + #ifdef Z_AFTER_PROBING if (raise_after == PROBE_PT_STOW) move_z_after_probing(); #endif diff --git a/Marlin/src/gcode/probe/M401_M402.cpp b/Marlin/src/gcode/probe/M401_M402.cpp index 9beef4730..1e81e6b4a 100644 --- a/Marlin/src/gcode/probe/M401_M402.cpp +++ b/Marlin/src/gcode/probe/M401_M402.cpp @@ -41,7 +41,7 @@ void GcodeSuite::M401() { */ void GcodeSuite::M402() { STOW_PROBE(); - #if Z_AFTER_PROBING + #ifdef Z_AFTER_PROBING move_z_after_probing(); #endif report_current_position(); diff --git a/Marlin/src/module/probe.cpp b/Marlin/src/module/probe.cpp index 810006026..a1256994a 100644 --- a/Marlin/src/module/probe.cpp +++ b/Marlin/src/module/probe.cpp @@ -465,7 +465,7 @@ bool set_probe_deployed(const bool deploy) { return false; } -#if Z_AFTER_PROBING +#ifdef Z_AFTER_PROBING // After probing move to a preferred Z position void move_z_after_probing() { if (current_position[Z_AXIS] != Z_AFTER_PROBING) { diff --git a/Marlin/src/module/probe.h b/Marlin/src/module/probe.h index 3e507581e..3014a8966 100644 --- a/Marlin/src/module/probe.h +++ b/Marlin/src/module/probe.h @@ -32,7 +32,7 @@ #if HAS_BED_PROBE extern float zprobe_zoffset; bool set_probe_deployed(const bool deploy); - #if Z_AFTER_PROBING + #ifdef Z_AFTER_PROBING void move_z_after_probing(); #endif enum ProbePtRaise : unsigned char {