Browse Source

Fix G29_RETRY_AND_RECOVER dependency (#21907)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
ondrada 3 years ago
parent
commit
874c531f27
No account linked to committer's email address
2 changed files with 7 additions and 2 deletions
  1. 6
    2
      Marlin/src/gcode/gcode.cpp
  2. 1
    0
      Marlin/src/inc/Conditionals_LCD.h

+ 6
- 2
Marlin/src/gcode/gcode.cpp View File

@@ -211,7 +211,7 @@ void GcodeSuite::dwell(millis_t time) {
211 211
  * When G29_RETRY_AND_RECOVER is enabled, call G29() in
212 212
  * a loop with recovery and retry handling.
213 213
  */
214
-#if BOTH(HAS_LEVELING, G29_RETRY_AND_RECOVER)
214
+#if ENABLED(G29_RETRY_AND_RECOVER)
215 215
 
216 216
   void GcodeSuite::event_probe_recover() {
217 217
     TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying"), DISMISS_STR));
@@ -223,6 +223,10 @@ void GcodeSuite::dwell(millis_t time) {
223 223
     #endif
224 224
   }
225 225
 
226
+  #if ENABLED(G29_HALT_ON_FAILURE)
227
+    #include "../lcd/marlinui.h"
228
+  #endif
229
+
226 230
   void GcodeSuite::event_probe_failure() {
227 231
     #ifdef ACTION_ON_G29_FAILURE
228 232
       host_action(PSTR(ACTION_ON_G29_FAILURE));
@@ -262,7 +266,7 @@ void GcodeSuite::dwell(millis_t time) {
262 266
     #endif
263 267
   }
264 268
 
265
-#endif // HAS_LEVELING && G29_RETRY_AND_RECOVER
269
+#endif // G29_RETRY_AND_RECOVER
266 270
 
267 271
 /**
268 272
  * Process the parsed command and dispatch it to its handler

+ 1
- 0
Marlin/src/inc/Conditionals_LCD.h View File

@@ -870,6 +870,7 @@
870 870
 #if !HAS_LEVELING
871 871
   #undef RESTORE_LEVELING_AFTER_G28
872 872
   #undef ENABLE_LEVELING_AFTER_G28
873
+  #undef G29_RETRY_AND_RECOVER
873 874
 #endif
874 875
 #if !HAS_LEVELING || EITHER(MESH_BED_LEVELING, AUTO_BED_LEVELING_UBL)
875 876
   #undef PROBE_MANUALLY

Loading…
Cancel
Save