Fix auto#.g file handling, add NO_SD_AUTOSTART (#20071)
This commit is contained in:
@@ -460,6 +460,7 @@ void startOrResumeJob() {
|
||||
#if ENABLED(SDSUPPORT)
|
||||
|
||||
inline void abortSDPrinting() {
|
||||
IF_DISABLED(NO_SD_AUTOSTART, card.autofile_cancel());
|
||||
card.endFilePrint(TERN_(SD_RESORT, true));
|
||||
queue.clear();
|
||||
quickstop_stepper();
|
||||
@@ -585,7 +586,7 @@ inline void manage_inactivity(const bool ignore_stepper_queue=false) {
|
||||
if (ELAPSED(ms, next_home_key_ms)) {
|
||||
next_home_key_ms = ms + HOME_DEBOUNCE_DELAY;
|
||||
LCD_MESSAGEPGM(MSG_AUTO_HOME);
|
||||
queue.enqueue_now_P(G28_STR);
|
||||
queue.inject_P(G28_STR);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@@ -1354,7 +1355,6 @@ void loop() {
|
||||
idle();
|
||||
|
||||
#if ENABLED(SDSUPPORT)
|
||||
card.checkautostart();
|
||||
if (card.flag.abort_sd_printing) abortSDPrinting();
|
||||
if (marlin_state == MF_SD_COMPLETE) finishSDPrinting();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user