Browse Source

Merge pull request #3908 from jbrazio/bugfix/3826

Closes #3826: SD printing will now pause and stop the print counter
Scott Lahteine 9 years ago
parent
commit
3861f1e0da
2 changed files with 10 additions and 3 deletions
  1. 1
    1
      Marlin/printcounter.cpp
  2. 9
    2
      Marlin/ultralcd.cpp

+ 1
- 1
Marlin/printcounter.cpp View File

86
 
86
 
87
   SERIAL_ECHOPGM(", Failed: ");
87
   SERIAL_ECHOPGM(", Failed: ");
88
   SERIAL_ECHO(this->data.totalPrints - this->data.finishedPrints
88
   SERIAL_ECHO(this->data.totalPrints - this->data.finishedPrints
89
-    - (this->isRunning() || this->isPaused()) ? 1 : 0); // Removes 1 from failures with an active counter
89
+    - ((this->isRunning() || this->isPaused()) ? 1 : 0)); // Removes 1 from failures with an active counter
90
 
90
 
91
   uint32_t t = this->data.printTime /60;
91
   uint32_t t = this->data.printTime /60;
92
   SERIAL_ECHOPGM(", Total print time: ");
92
   SERIAL_ECHOPGM(", Total print time: ");

+ 9
- 2
Marlin/ultralcd.cpp View File

470
 
470
 
471
 #if ENABLED(SDSUPPORT)
471
 #if ENABLED(SDSUPPORT)
472
 
472
 
473
-  static void lcd_sdcard_pause() { card.pauseSDPrint(); }
473
+  static void lcd_sdcard_pause() {
474
+    card.pauseSDPrint();
475
+    print_job_timer.pause();
476
+  }
474
 
477
 
475
-  static void lcd_sdcard_resume() { card.startFileprint(); }
478
+  static void lcd_sdcard_resume() {
479
+    card.startFileprint();
480
+    print_job_timer.start();
481
+  }
476
 
482
 
477
   static void lcd_sdcard_stop() {
483
   static void lcd_sdcard_stop() {
478
     stepper.quick_stop();
484
     stepper.quick_stop();
479
     card.sdprinting = false;
485
     card.sdprinting = false;
480
     card.closefile();
486
     card.closefile();
487
+    print_job_timer.stop();
481
     thermalManager.autotempShutdown();
488
     thermalManager.autotempShutdown();
482
     cancel_heatup = true;
489
     cancel_heatup = true;
483
     lcd_setstatus(MSG_PRINT_ABORTED, true);
490
     lcd_setstatus(MSG_PRINT_ABORTED, true);

Loading…
Cancel
Save