From 98427ea92ac538374f8366542c5a51bc213780b5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sat, 10 Oct 2020 12:07:00 -0500 Subject: [PATCH] Save PLR on resume from pause (#19676) Co-Authored-By: shahab <32130261+SHBnik@users.noreply.github.com> --- Marlin/src/feature/pause.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Marlin/src/feature/pause.cpp b/Marlin/src/feature/pause.cpp index a36ff50756..0ab6594021 100644 --- a/Marlin/src/feature/pause.cpp +++ b/Marlin/src/feature/pause.cpp @@ -61,6 +61,10 @@ #include "../libs/buzzer.h" #endif +#if ENABLED(POWER_LOSS_RECOVERY) + #include "powerloss.h" +#endif + #include "../libs/nozzle.h" #include "pause.h" @@ -640,6 +644,9 @@ void resume_print(const float &slow_load_length/*=0*/, const float &fast_load_le // Set extruder to saved position planner.set_e_position_mm((destination.e = current_position.e = resume_position.e)); + // Write PLR now to update the z axis value + TERN_(POWER_LOSS_RECOVERY, if (recovery.enabled) recovery.save(true)); + TERN_(HAS_LCD_MENU, lcd_pause_show_message(PAUSE_MESSAGE_STATUS)); #ifdef ACTION_ON_RESUMED