|
@@ -617,7 +617,7 @@ void lcdui_print_status_line(void)
|
|
|
case CustomMsg::M117: // M117 Set the status line message on the LCD
|
|
|
case CustomMsg::Status: // Nothing special, print status message normally
|
|
|
case CustomMsg::M0Wait: // M0/M1 Wait command working even from SD
|
|
|
- lcd_print(lcd_status_message);
|
|
|
+ lcd_print_pad(lcd_status_message, LCD_WIDTH);
|
|
|
break;
|
|
|
case CustomMsg::MeshBedLeveling: // If mesh bed leveling in progress, show the status
|
|
|
if (custom_message_state > 10) {
|
|
@@ -641,10 +641,10 @@ void lcdui_print_status_line(void)
|
|
|
}
|
|
|
break;
|
|
|
case CustomMsg::FilamentLoading: // If loading filament, print status
|
|
|
- lcd_print(lcd_status_message);
|
|
|
+ lcd_print_pad(lcd_status_message, LCD_WIDTH);
|
|
|
break;
|
|
|
case CustomMsg::PidCal: // PID tuning in progress
|
|
|
- lcd_print(lcd_status_message);
|
|
|
+ lcd_print_pad(lcd_status_message, LCD_WIDTH);
|
|
|
if (pid_cycle <= pid_number_of_cycles && custom_message_state > 0) {
|
|
|
lcd_set_cursor(10, 3);
|
|
|
lcd_print(itostr3(pid_cycle));
|
|
@@ -7482,16 +7482,6 @@ void menu_action_sddirectory(const char* filename)
|
|
|
|
|
|
/** LCD API **/
|
|
|
|
|
|
-static void lcd_padstatus() {
|
|
|
- int len = strlen(lcd_status_message);
|
|
|
- if (len > 0) {
|
|
|
- while (len < LCD_WIDTH) {
|
|
|
- lcd_status_message[len++] = ' ';
|
|
|
- }
|
|
|
- }
|
|
|
- lcd_status_message[LCD_WIDTH] = '\0';
|
|
|
-}
|
|
|
-
|
|
|
void ultralcd_init()
|
|
|
{
|
|
|
{
|
|
@@ -7526,7 +7516,6 @@ void ultralcd_init()
|
|
|
|
|
|
// Initialise status line
|
|
|
strncpy_P(lcd_status_message, MSG_WELCOME, LCD_WIDTH);
|
|
|
- lcd_padstatus();
|
|
|
}
|
|
|
|
|
|
void lcd_ignore_click(bool b)
|
|
@@ -7537,7 +7526,6 @@ void lcd_ignore_click(bool b)
|
|
|
|
|
|
void lcd_finishstatus() {
|
|
|
SERIAL_PROTOCOLLNRPGM(MSG_LCD_STATUS_CHANGED);
|
|
|
- lcd_padstatus();
|
|
|
lcd_draw_update = 2;
|
|
|
}
|
|
|
|
|
@@ -7583,12 +7571,18 @@ void lcd_setstatuspgm(const char* message)
|
|
|
void lcd_setalertstatus_(const char* message, uint8_t severity, bool progmem)
|
|
|
{
|
|
|
if (lcd_message_check(severity)) {
|
|
|
+ bool same = !(progmem?
|
|
|
+ strcmp_P(lcd_status_message, message):
|
|
|
+ strcmp(lcd_status_message, message));
|
|
|
lcd_updatestatus(message, progmem);
|
|
|
lcd_status_message_timeout.start();
|
|
|
lcd_status_message_level = severity;
|
|
|
custom_message_type = CustomMsg::Status;
|
|
|
custom_message_state = 0;
|
|
|
- lcd_return_to_status();
|
|
|
+ if (!same) {
|
|
|
+ // do not kick the user out of the menus if the message is unchanged
|
|
|
+ lcd_return_to_status();
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
|