[1.1.x] Reset LCD status to fallbacks (#10467)
* Remove obsolete strings * Tweak some static consts * Reset LCD status to fallbacks When paused, "Print paused..." When SD printing, the filename When host printing, "Printing..." When idle, "MyPrinter ready."
This commit is contained in:
parent
38c97dc975
commit
6f176d1d64
40 changed files with 82 additions and 172 deletions
|
|
@ -743,7 +743,27 @@ void lcd_status_screen() {
|
|||
lcd_implementation_status_screen();
|
||||
}
|
||||
|
||||
void lcd_reset_status() { lcd_setstatusPGM(PSTR(""), -1); }
|
||||
/**
|
||||
* Reset the status message
|
||||
*/
|
||||
void lcd_reset_status() {
|
||||
static const char paused[] PROGMEM = MSG_PRINT_PAUSED;
|
||||
static const char printing[] PROGMEM = MSG_PRINTING;
|
||||
static const char welcome[] PROGMEM = WELCOME_MSG;
|
||||
const char *msg;
|
||||
if (print_job_timer.isPaused())
|
||||
msg = paused;
|
||||
#if ENABLED(SDSUPPORT)
|
||||
else if (card.sdprinting)
|
||||
return lcd_setstatus(card.longFilename[0] ? card.longFilename : card.filename, true);
|
||||
#endif
|
||||
else if (print_job_timer.isRunning())
|
||||
msg = printing;
|
||||
else
|
||||
msg = welcome;
|
||||
|
||||
lcd_setstatusPGM(msg, -1);
|
||||
}
|
||||
|
||||
/**
|
||||
*
|
||||
|
|
@ -774,7 +794,7 @@ void kill_screen(const char* lcd_msg) {
|
|||
}
|
||||
|
||||
void lcd_quick_feedback(const bool clear_buttons) {
|
||||
lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW;
|
||||
lcd_refresh();
|
||||
if (clear_buttons) buttons = 0;
|
||||
next_button_update_ms = millis() + 500;
|
||||
|
||||
|
|
@ -812,7 +832,7 @@ void kill_screen(const char* lcd_msg) {
|
|||
#if ENABLED(PARK_HEAD_ON_PAUSE)
|
||||
enqueue_and_echo_commands_P(PSTR("M125"));
|
||||
#endif
|
||||
lcd_setstatusPGM(PSTR(MSG_PRINT_PAUSED), -1);
|
||||
lcd_reset_status();
|
||||
}
|
||||
|
||||
void lcd_sdcard_resume() {
|
||||
|
|
@ -3836,7 +3856,7 @@ void kill_screen(const char* lcd_msg) {
|
|||
encoderPosition = card.updir() ? ENCODER_STEPS_PER_MENU_ITEM : 0;
|
||||
encoderTopLine = 0;
|
||||
screen_changed = true;
|
||||
lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW;
|
||||
lcd_refresh();
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -4697,8 +4717,7 @@ void kill_screen(const char* lcd_msg) {
|
|||
void menu_edit_callback_ ## _name() { if (_menu_edit_ ## _name()) (*callbackFunc)(); } \
|
||||
void _menu_action_setting_edit_ ## _name(const char * const pstr, _type* const ptr, const _type minValue, const _type maxValue) { \
|
||||
lcd_save_previous_screen(); \
|
||||
\
|
||||
lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; \
|
||||
lcd_refresh(); \
|
||||
\
|
||||
editLabel = pstr; \
|
||||
editValue = ptr; \
|
||||
|
|
@ -4838,6 +4857,7 @@ void kill_screen(const char* lcd_msg) {
|
|||
UNUSED(longFilename);
|
||||
card.openAndPrintFile(filename);
|
||||
lcd_return_to_status();
|
||||
lcd_reset_status();
|
||||
}
|
||||
|
||||
void menu_action_sddirectory(const char* filename, char* longFilename) {
|
||||
|
|
@ -4849,12 +4869,12 @@ void kill_screen(const char* lcd_msg) {
|
|||
#if ENABLED(DOGLCD)
|
||||
drawing_screen = false;
|
||||
#endif
|
||||
lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW;
|
||||
lcd_refresh();
|
||||
}
|
||||
|
||||
#endif // SDSUPPORT
|
||||
|
||||
void menu_action_setting_edit_bool(const char* pstr, bool* ptr) { UNUSED(pstr); *ptr ^= true; lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW; }
|
||||
void menu_action_setting_edit_bool(const char* pstr, bool* ptr) { UNUSED(pstr); *ptr ^= true; lcd_refresh(); }
|
||||
void menu_action_setting_edit_callback_bool(const char* pstr, bool* ptr, screenFunc_t callback) {
|
||||
menu_action_setting_edit_bool(pstr, ptr);
|
||||
(*callback)();
|
||||
|
|
@ -5045,7 +5065,7 @@ void lcd_update() {
|
|||
if (old_sd_status != 2) LCD_MESSAGEPGM(MSG_SD_REMOVED);
|
||||
}
|
||||
|
||||
lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW;
|
||||
lcd_refresh();
|
||||
lcd_implementation_init( // to maybe revive the LCD if static electricity killed it.
|
||||
#if ENABLED(LCD_PROGRESS_BAR)
|
||||
currentScreen == lcd_status_screen ? CHARSET_INFO : CHARSET_MENU
|
||||
|
|
@ -5290,7 +5310,7 @@ void lcd_finishstatus(const bool persist=false) {
|
|||
expire_status_ms = persist ? 0 : progress_bar_ms + PROGRESS_MSG_EXPIRE;
|
||||
#endif
|
||||
#endif
|
||||
lcdDrawUpdate = LCDVIEW_CLEAR_CALL_REDRAW;
|
||||
lcd_refresh();
|
||||
|
||||
#if ENABLED(FILAMENT_LCD_DISPLAY) && ENABLED(SDSUPPORT)
|
||||
previous_lcd_status_ms = millis(); //get status message to show up for a while
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue