Browse Source

Fix G29_RETRY_AND_RECOVER dependency (#21907)

Co-authored-by: Scott Lahteine <github@thinkyhead.com>
ondrada 4 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
  * When G29_RETRY_AND_RECOVER is enabled, call G29() in
211
  * When G29_RETRY_AND_RECOVER is enabled, call G29() in
212
  * a loop with recovery and retry handling.
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
   void GcodeSuite::event_probe_recover() {
216
   void GcodeSuite::event_probe_recover() {
217
     TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying"), DISMISS_STR));
217
     TERN_(HOST_PROMPT_SUPPORT, host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying"), DISMISS_STR));
223
     #endif
223
     #endif
224
   }
224
   }
225
 
225
 
226
+  #if ENABLED(G29_HALT_ON_FAILURE)
227
+    #include "../lcd/marlinui.h"
228
+  #endif
229
+
226
   void GcodeSuite::event_probe_failure() {
230
   void GcodeSuite::event_probe_failure() {
227
     #ifdef ACTION_ON_G29_FAILURE
231
     #ifdef ACTION_ON_G29_FAILURE
228
       host_action(PSTR(ACTION_ON_G29_FAILURE));
232
       host_action(PSTR(ACTION_ON_G29_FAILURE));
262
     #endif
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
  * Process the parsed command and dispatch it to its handler
272
  * Process the parsed command and dispatch it to its handler

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

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

Loading…
Cancel
Save