Close SD file in print_stop instead of UnconditionalStop()
Change in memory: Flash: -6 bytes SRAM: 0 bytes
This commit is contained in:
parent
3ad40f0206
commit
30d0da4698
|
|
@ -9685,12 +9685,6 @@ void UnconditionalStop()
|
||||||
cmdqueue_reset();
|
cmdqueue_reset();
|
||||||
cmdqueue_serial_disabled = false;
|
cmdqueue_serial_disabled = false;
|
||||||
|
|
||||||
// Reset the sd status
|
|
||||||
if (card.sdprinting) {
|
|
||||||
card.sdprinting = false;
|
|
||||||
card.closefile();
|
|
||||||
}
|
|
||||||
|
|
||||||
st_reset_timer();
|
st_reset_timer();
|
||||||
CRITICAL_SECTION_END;
|
CRITICAL_SECTION_END;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -5646,7 +5646,11 @@ void print_stop(bool interactive)
|
||||||
// called by the main loop one iteration later.
|
// called by the main loop one iteration later.
|
||||||
UnconditionalStop();
|
UnconditionalStop();
|
||||||
|
|
||||||
if (!card.sdprinting) {
|
if (card.sdprinting) {
|
||||||
|
// Reset the sd status
|
||||||
|
card.sdprinting = false;
|
||||||
|
card.closefile();
|
||||||
|
} else {
|
||||||
SERIAL_ECHOLNRPGM(MSG_OCTOPRINT_CANCEL); // for Octoprint
|
SERIAL_ECHOLNRPGM(MSG_OCTOPRINT_CANCEL); // for Octoprint
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue