|
|
@ -754,7 +754,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); |
|
|
|
} |
|
|
|
|
|
|
|
/**
|
|
|
|
* |
|
|
@ -785,7 +805,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; |
|
|
|
|
|
|
@ -823,7 +843,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() { |
|
|
@ -3846,7 +3866,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(); |
|
|
|
} |
|
|
|
|
|
|
|
/**
|
|
|
@ -4707,8 +4727,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; \ |
|
|
@ -4848,6 +4867,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) { |
|
|
@ -4859,12 +4879,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)(); |
|
|
@ -5037,7 +5057,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 |
|
|
@ -5282,7 +5302,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
|
|
|
|