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
     case 'X':
228
     case 'X':
229
       // cancel print
229
       // cancel print
230
       write_to_lcd_P(PSTR("{SYS:CANCELING}"));
230
       write_to_lcd_P(PSTR("{SYS:CANCELING}"));
231
+      card.stopSDPrint();
231
       clear_command_queue();
232
       clear_command_queue();
232
       quickstop_stepper();
233
       quickstop_stepper();
233
       print_job_timer.stop();
234
       print_job_timer.stop();

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

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

Loading…
Cancel
Save