From 908caba7353cc321736cdf3fab61ea58163ee87e Mon Sep 17 00:00:00 2001 From: ondrada <82547068+ondrada@users.noreply.github.com> Date: Sat, 15 May 2021 05:29:17 +0200 Subject: [PATCH] Fix G29_RETRY_AND_RECOVER dependency (#21907) Co-authored-by: Scott Lahteine --- Marlin/src/gcode/gcode.cpp | 8 ++++++-- Marlin/src/inc/Conditionals_LCD.h | 1 + 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/Marlin/src/gcode/gcode.cpp b/Marlin/src/gcode/gcode.cpp index 241def0f77..7a3976a7bd 100644 --- a/Marlin/src/gcode/gcode.cpp +++ b/Marlin/src/gcode/gcode.cpp @@ -211,7 +211,7 @@ void GcodeSuite::dwell(millis_t time) { * When G29_RETRY_AND_RECOVER is enabled, call G29() in * a loop with recovery and retry handling. */ -#if BOTH(HAS_LEVELING, G29_RETRY_AND_RECOVER) +#if ENABLED(G29_RETRY_AND_RECOVER) void GcodeSuite::event_probe_recover() { TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying"), DISMISS_STR)); @@ -223,6 +223,10 @@ void GcodeSuite::dwell(millis_t time) { #endif } + #if ENABLED(G29_HALT_ON_FAILURE) + #include "../lcd/marlinui.h" + #endif + void GcodeSuite::event_probe_failure() { #ifdef ACTION_ON_G29_FAILURE host_action(PSTR(ACTION_ON_G29_FAILURE)); @@ -262,7 +266,7 @@ void GcodeSuite::dwell(millis_t time) { #endif } -#endif // HAS_LEVELING && G29_RETRY_AND_RECOVER +#endif // G29_RETRY_AND_RECOVER /** * Process the parsed command and dispatch it to its handler diff --git a/Marlin/src/inc/Conditionals_LCD.h b/Marlin/src/inc/Conditionals_LCD.h index 42349b955e..000aa60347 100644 --- a/Marlin/src/inc/Conditionals_LCD.h +++ b/Marlin/src/inc/Conditionals_LCD.h @@ -870,6 +870,7 @@ #if !HAS_LEVELING #undef RESTORE_LEVELING_AFTER_G28 #undef ENABLE_LEVELING_AFTER_G28 + #undef G29_RETRY_AND_RECOVER #endif #if !HAS_LEVELING || EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL) #undef PROBE_MANUALLY