Browse Source

Better ooze prevention during pause (#17625)

Ondřej Nový 4 years ago
parent
commit
468b813bc1
No account linked to committer's email address
1 changed files with 16 additions and 12 deletions
  1. 16
    12
      Marlin/src/feature/pause.cpp

+ 16
- 12
Marlin/src/feature/pause.cpp View File

541
  *   - a nozzle timed out, or
541
  *   - a nozzle timed out, or
542
  *   - the nozzle is already heated.
542
  *   - the nozzle is already heated.
543
  * - Display "wait for print to resume"
543
  * - Display "wait for print to resume"
544
+ * - Retract to prevent oozing
545
+ * - Move the nozzle back to resume_position
546
+ * - Unretract
544
  * - Re-prime the nozzle...
547
  * - Re-prime the nozzle...
545
  *   -  FWRETRACT: Recover/prime from the prior G10.
548
  *   -  FWRETRACT: Recover/prime from the prior G10.
546
  *   - !FWRETRACT: Retract by resume_position.e, if negative.
549
  *   - !FWRETRACT: Retract by resume_position.e, if negative.
547
  *                 Not sure how this logic comes into use.
550
  *                 Not sure how this logic comes into use.
548
- * - Move the nozzle back to resume_position
549
  * - Sync the planner E to resume_position.e
551
  * - Sync the planner E to resume_position.e
550
  * - Send host action for resume, if configured
552
  * - Send host action for resume, if configured
551
  * - Resume the current SD print job, if any
553
  * - Resume the current SD print job, if any
574
 
576
 
575
   TERN_(HAS_LCD_MENU, lcd_pause_show_message(PAUSE_MESSAGE_RESUME));
577
   TERN_(HAS_LCD_MENU, lcd_pause_show_message(PAUSE_MESSAGE_RESUME));
576
 
578
 
579
+  // Retract to prevent oozing
580
+  unscaled_e_move(-(PAUSE_PARK_RETRACT_LENGTH), feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE));
581
+
582
+  // Move XY to starting position, then Z
583
+  do_blocking_move_to_xy(resume_position, feedRate_t(NOZZLE_PARK_XY_FEEDRATE));
584
+
585
+  // Move Z_AXIS to saved position
586
+  do_blocking_move_to_z(resume_position.z, feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
587
+
588
+  // Unretract
589
+  unscaled_e_move(PAUSE_PARK_RETRACT_LENGTH, feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE));
590
+
577
   // Intelligent resuming
591
   // Intelligent resuming
578
   #if ENABLED(FWRETRACT)
592
   #if ENABLED(FWRETRACT)
579
     // If retracted before goto pause
593
     // If retracted before goto pause
583
 
597
 
584
   // If resume_position is negative
598
   // If resume_position is negative
585
   if (resume_position.e < 0) unscaled_e_move(resume_position.e, feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE));
599
   if (resume_position.e < 0) unscaled_e_move(resume_position.e, feedRate_t(PAUSE_PARK_RETRACT_FEEDRATE));
586
-
587
-  // Move XY to starting position, then Z
588
-  do_blocking_move_to_xy(resume_position, feedRate_t(NOZZLE_PARK_XY_FEEDRATE));
589
-
590
-  // Move Z_AXIS to saved position
591
-  do_blocking_move_to_z(resume_position.z, feedRate_t(NOZZLE_PARK_Z_FEEDRATE));
592
-
593
   #if ADVANCED_PAUSE_RESUME_PRIME != 0
600
   #if ADVANCED_PAUSE_RESUME_PRIME != 0
594
     unscaled_e_move(ADVANCED_PAUSE_RESUME_PRIME, feedRate_t(ADVANCED_PAUSE_PURGE_FEEDRATE));
601
     unscaled_e_move(ADVANCED_PAUSE_RESUME_PRIME, feedRate_t(ADVANCED_PAUSE_PURGE_FEEDRATE));
595
   #endif
602
   #endif
611
   TERN_(HOST_PROMPT_SUPPORT, host_prompt_open(PROMPT_INFO, PSTR("Resuming"), DISMISS_STR));
618
   TERN_(HOST_PROMPT_SUPPORT, host_prompt_open(PROMPT_INFO, PSTR("Resuming"), DISMISS_STR));
612
 
619
 
613
   #if ENABLED(SDSUPPORT)
620
   #if ENABLED(SDSUPPORT)
614
-    if (did_pause_print) {
615
-      card.startFileprint();
616
-      --did_pause_print;
617
-    }
621
+    if (did_pause_print) { card.startFileprint(); --did_pause_print; }
618
   #endif
622
   #endif
619
 
623
 
620
   #if ENABLED(ADVANCED_PAUSE_FANS_PAUSE) && FAN_COUNT > 0
624
   #if ENABLED(ADVANCED_PAUSE_FANS_PAUSE) && FAN_COUNT > 0

Loading…
Cancel
Save