From b059c9e5c07e49f7d97f1f1c72786a5e153a6c6a Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Mon, 25 Jan 2021 04:56:54 -0600 Subject: [PATCH] Reformat abortSDPrinting --- Marlin/src/MarlinCore.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/Marlin/src/MarlinCore.cpp b/Marlin/src/MarlinCore.cpp index 290cd4c412..31959dbda3 100644 --- a/Marlin/src/MarlinCore.cpp +++ b/Marlin/src/MarlinCore.cpp @@ -362,19 +362,19 @@ void startOrResumeJob() { inline void abortSDPrinting() { IF_DISABLED(NO_SD_AUTOSTART, card.autofile_cancel()); card.endFilePrint(TERN_(SD_RESORT, true)); + queue.clear(); quickstop_stepper(); print_job_timer.stop(); - #if DISABLED(SD_ABORT_NO_COOLDOWN) - thermalManager.disable_all_heaters(); - #endif - #if !HAS_CUTTER - thermalManager.zero_fan_speeds(); - #else - cutter.kill(); // Full cutter shutdown including ISR control - #endif + + IF_DISABLED(SD_ABORT_NO_COOLDOWN, thermalManager.disable_all_heaters()); + + TERN(HAS_CUTTER, cutter.kill(), thermalManager.zero_fan_speeds()); // Full cutter shutdown including ISR control + wait_for_heatup = false; + TERN_(POWER_LOSS_RECOVERY, recovery.purge()); + #ifdef EVENT_GCODE_SD_ABORT queue.inject_P(PSTR(EVENT_GCODE_SD_ABORT)); #endif