Skip to content

Commit

Permalink
Fix G29_RETRY_AND_RECOVER dependency (#21907)
Browse files Browse the repository at this point in the history
Co-authored-by: Scott Lahteine <[email protected]>
  • Loading branch information
ondrada and thinkyhead authored May 15, 2021
1 parent 3b4643d commit 874c531
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Marlin/src/gcode/gcode.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand All @@ -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));
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions Marlin/src/inc/Conditionals_LCD.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 874c531

Please sign in to comment.