Do not show/call LCD status updates when unchanged

This mostly prevents useless serial noise
This commit is contained in:
Yuri D'Elia 2022-12-17 16:35:26 +01:00 committed by 3d-gussner
parent a551536386
commit 5e50a15c88
1 changed files with 1 additions and 1 deletions

View File

@ -7702,13 +7702,13 @@ void lcd_setalertstatus_(const char* message, uint8_t severity, bool progmem)
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;
if (!same) {
// do not kick the user out of the menus if the message is unchanged
lcd_updatestatus(message, progmem);
lcd_return_to_status();
}
}