Browse Source

Fix host action / G-code ordering in event_probe_failure (#13207)

Observing from the console, it makes the most sense to do `//action:probe_retry` before executing commands.
Marcio Teixeira 6 years ago
parent
commit
992cdc8d14
1 changed files with 6 additions and 6 deletions
  1. 6
    6
      Marlin/src/Marlin.cpp

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

386
 #if ENABLED(G29_RETRY_AND_RECOVER)
386
 #if ENABLED(G29_RETRY_AND_RECOVER)
387
 
387
 
388
   void event_probe_failure() {
388
   void event_probe_failure() {
389
+    #ifdef ACTION_ON_G29_FAILURE
390
+      host_action(PSTR(ACTION_ON_G29_FAILURE));
391
+    #endif
389
     #ifdef G29_FAILURE_COMMANDS
392
     #ifdef G29_FAILURE_COMMANDS
390
       gcode.process_subcommands_now_P(PSTR(G29_FAILURE_COMMANDS));
393
       gcode.process_subcommands_now_P(PSTR(G29_FAILURE_COMMANDS));
391
     #endif
394
     #endif
392
-    #ifdef ACTION_ON_G29_FAILURE
393
-      host_action(PSTR(ACTION_ON_G29_FAILURE)); }
394
-    #endif
395
     #if ENABLED(G29_HALT_ON_FAILURE)
395
     #if ENABLED(G29_HALT_ON_FAILURE)
396
       #ifdef ACTION_ON_CANCEL
396
       #ifdef ACTION_ON_CANCEL
397
         host_action_cancel();
397
         host_action_cancel();
404
     #if ENABLED(HOST_PROMPT_SUPPORT)
404
     #if ENABLED(HOST_PROMPT_SUPPORT)
405
       host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying"));
405
       host_prompt_do(PROMPT_INFO, PSTR("G29 Retrying"));
406
     #endif
406
     #endif
407
-    #ifdef G29_RECOVER_COMMANDS
408
-      gcode.process_subcommands_now_P(PSTR(G29_RECOVER_COMMANDS));
409
-    #endif
410
     #ifdef ACTION_ON_G29_RECOVER
407
     #ifdef ACTION_ON_G29_RECOVER
411
       host_action(PSTR(ACTION_ON_G29_RECOVER));
408
       host_action(PSTR(ACTION_ON_G29_RECOVER));
412
     #endif
409
     #endif
410
+    #ifdef G29_RECOVER_COMMANDS
411
+      gcode.process_subcommands_now_P(PSTR(G29_RECOVER_COMMANDS));
412
+    #endif
413
   }
413
   }
414
 
414
 
415
 #endif
415
 #endif

Loading…
Cancel
Save