From 0fadb210ddd0be29295543d1747fe9b6ae1fe3a5 Mon Sep 17 00:00:00 2001 From: gudnimg Date: Sat, 14 Sep 2024 12:50:21 +0000 Subject: [PATCH] PFW-1561 Use did_pause_print explicitly print_job_timer is stopped at this point so print_job_timer.paused() always yields false. For this reason here we only need to check did_pause_print. I think this makes the code a bit easier to read and gives a reason why we are clearing the flag at the end of the function. --- Firmware/ultralcd.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Firmware/ultralcd.cpp b/Firmware/ultralcd.cpp index 14f4112af..286238307 100644 --- a/Firmware/ultralcd.cpp +++ b/Firmware/ultralcd.cpp @@ -5682,9 +5682,7 @@ void lcd_print_stop_finish() // The print was aborted while when the nozzle was cold: // 1. in a paused state => a partial backup in RAM is always available // 2. after a recoverable thermal/fan error had paused the print => only extruder temperature is saved to RAM - if (printingIsPaused()) - { - // Restore temperature saved in ram after pausing print + if (did_pause_print) { restore_extruder_temperature_from_ram(); }