Skip to content

Commit 908caba

Browse files
ondradathinkyhead
andcommitted
Fix G29_RETRY_AND_RECOVER dependency (MarlinFirmware#21907)
Co-authored-by: Scott Lahteine <github@thinkyhead.com>
1 parent 121f3b1 commit 908caba

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

Marlin/src/gcode/gcode.cpp

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ void GcodeSuite::dwell(millis_t time) {
211211
* When G29_RETRY_AND_RECOVER is enabled, call G29() in
212212
* a loop with recovery and retry handling.
213213
*/
214-
#if BOTH(HAS_LEVELING, G29_RETRY_AND_RECOVER)
214+
#if ENABLED(G29_RETRY_AND_RECOVER)
215215

216216
void GcodeSuite::event_probe_recover() {
217217
TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying"), DISMISS_STR));
@@ -223,6 +223,10 @@ void GcodeSuite::dwell(millis_t time) {
223223
#endif
224224
}
225225

226+
#if ENABLED(G29_HALT_ON_FAILURE)
227+
#include "../lcd/marlinui.h"
228+
#endif
229+
226230
void GcodeSuite::event_probe_failure() {
227231
#ifdef ACTION_ON_G29_FAILURE
228232
host_action(PSTR(ACTION_ON_G29_FAILURE));
@@ -262,7 +266,7 @@ void GcodeSuite::dwell(millis_t time) {
262266
#endif
263267
}
264268

265-
#endif // HAS_LEVELING && G29_RETRY_AND_RECOVER
269+
#endif // G29_RETRY_AND_RECOVER
266270

267271
/**
268272
* Process the parsed command and dispatch it to its handler

Marlin/src/inc/Conditionals_LCD.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -870,6 +870,7 @@
870870
#if !HAS_LEVELING
871871
#undef RESTORE_LEVELING_AFTER_G28
872872
#undef ENABLE_LEVELING_AFTER_G28
873+
#undef G29_RETRY_AND_RECOVER
873874
#endif
874875
#if !HAS_LEVELING || EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
875876
#undef PROBE_MANUALLY

0 commit comments

Comments
 (0)