Signal SD completion later (#21840)
This commit is contained in:
@@ -331,18 +331,14 @@ void disable_all_steppers() {
|
||||
}
|
||||
|
||||
/**
|
||||
* A Print Job exists when the timer is running or SD printing
|
||||
* A Print Job exists when the timer is running or SD is printing
|
||||
*/
|
||||
bool printJobOngoing() {
|
||||
return print_job_timer.isRunning() || IS_SD_PRINTING();
|
||||
}
|
||||
bool printJobOngoing() { return print_job_timer.isRunning() || IS_SD_PRINTING(); }
|
||||
|
||||
/**
|
||||
* Printing is active when the print job timer is running
|
||||
* Printing is active when a job is underway but not paused
|
||||
*/
|
||||
bool printingIsActive() {
|
||||
return !did_pause_print && (print_job_timer.isRunning() || IS_SD_PRINTING());
|
||||
}
|
||||
bool printingIsActive() { return !did_pause_print && printJobOngoing(); }
|
||||
|
||||
/**
|
||||
* Printing is paused according to SD or host indicators
|
||||
@@ -367,7 +363,7 @@ void startOrResumeJob() {
|
||||
|
||||
inline void abortSDPrinting() {
|
||||
IF_DISABLED(NO_SD_AUTOSTART, card.autofile_cancel());
|
||||
card.endFilePrint(TERN_(SD_RESORT, true));
|
||||
card.abortFilePrintNow(TERN_(SD_RESORT, true));
|
||||
|
||||
queue.clear();
|
||||
quickstop_stepper();
|
||||
@@ -748,7 +744,7 @@ void idle(TERN_(ADVANCED_PAUSE_FEATURE, bool no_stepper_sleep/*=false*/)) {
|
||||
|
||||
// Handle Power-Loss Recovery
|
||||
#if ENABLED(POWER_LOSS_RECOVERY) && PIN_EXISTS(POWER_LOSS)
|
||||
if (printJobOngoing()) recovery.outage();
|
||||
if (IS_SD_PRINTING()) recovery.outage();
|
||||
#endif
|
||||
|
||||
// Run StallGuard endstop checks
|
||||
@@ -901,7 +897,7 @@ void stop() {
|
||||
thermalManager.set_fans_paused(false); // Un-pause fans for safety
|
||||
#endif
|
||||
|
||||
if (IsRunning()) {
|
||||
if (!IsStopped()) {
|
||||
SERIAL_ERROR_MSG(STR_ERR_STOPPED);
|
||||
LCD_MESSAGEPGM(MSG_STOPPED);
|
||||
safe_delay(350); // allow enough time for messages to get out before stopping
|
||||
|
||||
Reference in New Issue
Block a user