Move abortSDPrinting with others
This commit is contained in:
parent
55c3929359
commit
583fc4ee2a
@ -378,6 +378,28 @@ void startOrResumeJob() {
|
||||
print_job_timer.start();
|
||||
}
|
||||
|
||||
void abortSDPrinting() {
|
||||
card.stopSDPrint(
|
||||
#if SD_RESORT
|
||||
true
|
||||
#endif
|
||||
);
|
||||
queue.clear();
|
||||
quickstop_stepper();
|
||||
print_job_timer.stop();
|
||||
#if DISABLED(SD_ABORT_NO_COOLDOWN)
|
||||
thermalManager.disable_all_heaters();
|
||||
#endif
|
||||
thermalManager.zero_fan_speeds();
|
||||
wait_for_heatup = false;
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
card.removeJobRecoveryFile();
|
||||
#endif
|
||||
#ifdef EVENT_GCODE_SD_STOP
|
||||
queue.inject_P(PSTR(EVENT_GCODE_SD_STOP));
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
* Manage several activities:
|
||||
* - Check for Filament Runout
|
||||
@ -1124,34 +1146,12 @@ void loop() {
|
||||
idle(); // Do an idle first so boot is slightly faster
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
|
||||
card.checkautostart();
|
||||
|
||||
if (card.flag.abort_sd_printing) {
|
||||
card.stopSDPrint(
|
||||
#if SD_RESORT
|
||||
true
|
||||
#endif
|
||||
);
|
||||
queue.clear();
|
||||
quickstop_stepper();
|
||||
print_job_timer.stop();
|
||||
#if DISABLED(SD_ABORT_NO_COOLDOWN)
|
||||
thermalManager.disable_all_heaters();
|
||||
#endif
|
||||
thermalManager.zero_fan_speeds();
|
||||
wait_for_heatup = false;
|
||||
#if ENABLED(POWER_LOSS_RECOVERY)
|
||||
card.removeJobRecoveryFile();
|
||||
#endif
|
||||
#ifdef EVENT_GCODE_SD_STOP
|
||||
queue.inject_P(PSTR(EVENT_GCODE_SD_STOP));
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif // SDSUPPORT
|
||||
if (card.flag.abort_sd_printing) abortSDPrinting();
|
||||
#endif
|
||||
|
||||
queue.advance();
|
||||
|
||||
endstops.event_handler();
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user