From f85e2ebb22f09470b13159624a1215d4f1faf4e0 Mon Sep 17 00:00:00 2001 From: Knutwurst <36196269+knutwurst@users.noreply.github.com> Date: Sun, 23 Jan 2022 12:39:32 +0100 Subject: [PATCH] Stop/Abort now works as expected and does not kill the printer. --- Marlin/src/lcd/anycubic_touchscreen.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/Marlin/src/lcd/anycubic_touchscreen.cpp b/Marlin/src/lcd/anycubic_touchscreen.cpp index b730abbc..7e794875 100755 --- a/Marlin/src/lcd/anycubic_touchscreen.cpp +++ b/Marlin/src/lcd/anycubic_touchscreen.cpp @@ -496,14 +496,7 @@ void AnycubicTouchscreenClass::PausePrint() { inline void AnycubicTouchscreenClass::StopPrint() { - // stop print, disable heaters - - if (card.isFileOpen) { - card.endFilePrintNow(); - card.closefile(); - } - - queue.clear(); + card.abortFilePrintNow(); #ifdef ANYCUBIC_TFT_DEBUG SERIAL_ECHOLNPGM("DEBUG: Stopped and cleared"); @@ -511,14 +504,14 @@ inline void AnycubicTouchscreenClass::StopPrint() print_job_timer.stop(); thermalManager.disable_all_heaters(); + thermalManager.zero_fan_speeds(); + ai3m_pause_state = 0; #ifdef ANYCUBIC_TFT_DEBUG SERIAL_ECHOPGM("DEBUG: AI3M Pause State: ", ai3m_pause_state); SERIAL_EOL(); #endif - #if FAN_COUNT > 0 - thermalManager.zero_fan_speeds(); - #endif + TFTstate = ANYCUBIC_TFT_STATE_SDSTOP_REQ; }