Add M524 to abort SD printing (#12155)

This commit is contained in:
TheSFReader
2018-10-19 21:25:07 +02:00
committed by Scott Lahteine
parent d26d9d5b81
commit 1fb9b299d4
9 changed files with 23 additions and 21 deletions

View File

@ -37,10 +37,6 @@
#if ENABLED(SDSUPPORT)
#include "../../sd/cardreader.h"
#include "../../feature/emergency_parser.h"
bool abort_sd_printing; // =false
#else
constexpr bool abort_sd_printing = false;
#endif
#if ENABLED(PRINTCOUNTER)
@ -476,7 +472,7 @@ namespace UI {
void stopPrint() {
#if ENABLED(SDSUPPORT)
wait_for_heatup = wait_for_user = false;
abort_sd_printing = true;
card.abort_sd_printing = true;
UI::onStatusChanged(PSTR(MSG_PRINT_ABORTED));
#endif
}

View File

@ -895,11 +895,9 @@ void lcd_quick_feedback(const bool clear_buttons) {
lcd_reset_status();
}
bool abort_sd_printing; // =false
void lcd_sdcard_stop() {
wait_for_heatup = wait_for_user = false;
abort_sd_printing = true;
card.abort_sd_printing = true;
lcd_setstatusPGM(PSTR(MSG_PRINT_ABORTED), -1);
lcd_return_to_status();
}

View File

@ -288,10 +288,5 @@
void lcd_reselect_last_file();
#endif
#if (ENABLED(EXTENSIBLE_UI) || ENABLED(ULTIPANEL)) && ENABLED(SDSUPPORT)
extern bool abort_sd_printing;
#else
constexpr bool abort_sd_printing = false;
#endif
#endif // ULTRALCD_H