Browse Source

Un-pause print on cancel (#9780)

Scott Lahteine 7 years ago
parent
commit
e749945317
No account linked to committer's email address
2 changed files with 8 additions and 0 deletions
  1. 1
    0
      Marlin/src/lcd/malyanlcd.cpp
  2. 7
    0
      Marlin/src/sd/cardreader.cpp

+ 1
- 0
Marlin/src/lcd/malyanlcd.cpp View File

@@ -228,6 +228,7 @@ void process_lcd_p_command(const char* command) {
228 228
     case 'X':
229 229
       // cancel print
230 230
       write_to_lcd_P(PSTR("{SYS:CANCELING}"));
231
+      card.stopSDPrint();
231 232
       clear_command_queue();
232 233
       quickstop_stepper();
233 234
       print_job_timer.stop();

+ 7
- 0
Marlin/src/sd/cardreader.cpp View File

@@ -33,6 +33,10 @@
33 33
 #include "../core/language.h"
34 34
 #include "../gcode/queue.h"
35 35
 
36
+#if ENABLED(ADVANCED_PAUSE_FEATURE)
37
+  #include "../feature/pause.h"
38
+#endif
39
+
36 40
 #include <ctype.h>
37 41
 
38 42
 #define LONGEST_FILENAME (longFilename[0] ? longFilename : filename)
@@ -325,6 +329,9 @@ void CardReader::startFileprint() {
325 329
 }
326 330
 
327 331
 void CardReader::stopSDPrint() {
332
+  #if ENABLED(ADVANCED_PAUSE_FEATURE)
333
+    did_pause_print = 0;
334
+  #endif
328 335
   sdprinting = false;
329 336
   if (isFileOpen()) file.close();
330 337
 }

Loading…
Cancel
Save