Browse Source

Save PLR on resume from pause (#19676)

Co-Authored-By: shahab <32130261+SHBnik@users.noreply.github.com>
Scott Lahteine 4 years ago
parent
commit
4ee717f7c4
1 changed files with 7 additions and 0 deletions
  1. 7
    0
      Marlin/src/feature/pause.cpp

+ 7
- 0
Marlin/src/feature/pause.cpp View File

61
   #include "../libs/buzzer.h"
61
   #include "../libs/buzzer.h"
62
 #endif
62
 #endif
63
 
63
 
64
+#if ENABLED(POWER_LOSS_RECOVERY)
65
+  #include "powerloss.h"
66
+#endif
67
+
64
 #include "../libs/nozzle.h"
68
 #include "../libs/nozzle.h"
65
 #include "pause.h"
69
 #include "pause.h"
66
 
70
 
640
   // Set extruder to saved position
644
   // Set extruder to saved position
641
   planner.set_e_position_mm((destination.e = current_position.e = resume_position.e));
645
   planner.set_e_position_mm((destination.e = current_position.e = resume_position.e));
642
 
646
 
647
+  // Write PLR now to update the z axis value
648
+  TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true));
649
+
643
   TERN_(HAS_LCD_MENU, lcd_pause_show_message(PAUSE_MESSAGE_STATUS));
650
   TERN_(HAS_LCD_MENU, lcd_pause_show_message(PAUSE_MESSAGE_STATUS));
644
 
651
 
645
   #ifdef ACTION_ON_RESUMED
652
   #ifdef ACTION_ON_RESUMED

Loading…
Cancel
Save