Merge pull request #3908 from jbrazio/bugfix/3826
Closes #3826: SD printing will now pause and stop the print counter
This commit is contained in:
commit
3861f1e0da
|
@ -86,7 +86,7 @@ void PrintCounter::showStats() {
|
||||||
|
|
||||||
SERIAL_ECHOPGM(", Failed: ");
|
SERIAL_ECHOPGM(", Failed: ");
|
||||||
SERIAL_ECHO(this->data.totalPrints - this->data.finishedPrints
|
SERIAL_ECHO(this->data.totalPrints - this->data.finishedPrints
|
||||||
- (this->isRunning() || this->isPaused()) ? 1 : 0); // Removes 1 from failures with an active counter
|
- ((this->isRunning() || this->isPaused()) ? 1 : 0)); // Removes 1 from failures with an active counter
|
||||||
|
|
||||||
uint32_t t = this->data.printTime /60;
|
uint32_t t = this->data.printTime /60;
|
||||||
SERIAL_ECHOPGM(", Total print time: ");
|
SERIAL_ECHOPGM(", Total print time: ");
|
||||||
|
|
|
@ -470,14 +470,21 @@ inline void line_to_current(AxisEnum axis) {
|
||||||
|
|
||||||
#if ENABLED(SDSUPPORT)
|
#if ENABLED(SDSUPPORT)
|
||||||
|
|
||||||
static void lcd_sdcard_pause() { card.pauseSDPrint(); }
|
static void lcd_sdcard_pause() {
|
||||||
|
card.pauseSDPrint();
|
||||||
|
print_job_timer.pause();
|
||||||
|
}
|
||||||
|
|
||||||
static void lcd_sdcard_resume() { card.startFileprint(); }
|
static void lcd_sdcard_resume() {
|
||||||
|
card.startFileprint();
|
||||||
|
print_job_timer.start();
|
||||||
|
}
|
||||||
|
|
||||||
static void lcd_sdcard_stop() {
|
static void lcd_sdcard_stop() {
|
||||||
stepper.quick_stop();
|
stepper.quick_stop();
|
||||||
card.sdprinting = false;
|
card.sdprinting = false;
|
||||||
card.closefile();
|
card.closefile();
|
||||||
|
print_job_timer.stop();
|
||||||
thermalManager.autotempShutdown();
|
thermalManager.autotempShutdown();
|
||||||
cancel_heatup = true;
|
cancel_heatup = true;
|
||||||
lcd_setstatus(MSG_PRINT_ABORTED, true);
|
lcd_setstatus(MSG_PRINT_ABORTED, true);
|
||||||
|
|
Loading…
Reference in a new issue