From e74994531780a34f629fd828589a58a49a7cbe24 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Fri, 23 Feb 2018 13:42:15 -0600 Subject: [PATCH] Un-pause print on cancel (#9780) --- Marlin/src/lcd/malyanlcd.cpp | 1 + Marlin/src/sd/cardreader.cpp | 7 +++++++ 2 files changed, 8 insertions(+) diff --git a/Marlin/src/lcd/malyanlcd.cpp b/Marlin/src/lcd/malyanlcd.cpp index b3b292de56..1548a9d55b 100644 --- a/Marlin/src/lcd/malyanlcd.cpp +++ b/Marlin/src/lcd/malyanlcd.cpp @@ -228,6 +228,7 @@ void process_lcd_p_command(const char* command) { case 'X': // cancel print write_to_lcd_P(PSTR("{SYS:CANCELING}")); + card.stopSDPrint(); clear_command_queue(); quickstop_stepper(); print_job_timer.stop(); diff --git a/Marlin/src/sd/cardreader.cpp b/Marlin/src/sd/cardreader.cpp index b78ffead5b..cbe9d6f1f7 100644 --- a/Marlin/src/sd/cardreader.cpp +++ b/Marlin/src/sd/cardreader.cpp @@ -33,6 +33,10 @@ #include "../core/language.h" #include "../gcode/queue.h" +#if ENABLED(ADVANCED_PAUSE_FEATURE) + #include "../feature/pause.h" +#endif + #include #define LONGEST_FILENAME (longFilename[0] ? longFilename : filename) @@ -325,6 +329,9 @@ void CardReader::startFileprint() { } void CardReader::stopSDPrint() { + #if ENABLED(ADVANCED_PAUSE_FEATURE) + did_pause_print = 0; + #endif sdprinting = false; if (isFileOpen()) file.close(); }