From 794251884a317443a1a5f5cc135b85ba8bc5105e Mon Sep 17 00:00:00 2001 From: gudnimg Date: Sun, 4 Feb 2024 12:06:14 +0000 Subject: [PATCH] PFW-1552 Fix a regression introduced in f022567 Aborting the print while the nozzle and bed are still heating up to their target temperatures should disable the heaters immediately. --- Firmware/Marlin_main.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Firmware/Marlin_main.cpp b/Firmware/Marlin_main.cpp index 7e5a9e5f9..5d0ca197a 100644 --- a/Firmware/Marlin_main.cpp +++ b/Firmware/Marlin_main.cpp @@ -9776,6 +9776,15 @@ void ConditionalStop() { CRITICAL_SECTION_START; + // Don't disable the heaters! lcd_print_stop_finish() will do it later via lcd_cooldown() + // + // However, the firmware must take into account the edge case when the firmware + // is running M109 or M190 G-codes. These G-codes execute a blocking while loop + // which waits for the bed or nozzle to reach their target temperature. + // To exit the loop, the firmware must set cancel_heatup to true. + cancel_heatup = true; + heating_status = HeatingStatus::NO_HEATING; + // Clear any saved printing state cancel_saved_printing();