Merge pull request #4461 from gudnimg/lcd-opt-message

optimisation: simplify two LCD messages
This commit is contained in:
Guðni Már Gilbert 2023-11-16 07:37:09 +00:00 committed by GitHub
commit 400722ec67
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 16 deletions

View File

@ -3350,27 +3350,15 @@ static void lcd_sort_type_set() {
#ifdef TMC2130
static void lcd_crash_mode_info()
{
lcd_update_enable(true);
static uint32_t tim = 0;
if ((tim + 1000) < _millis())
{
lcd_clear();
lcd_puts_P(_i("Crash detection can\nbe turned on only in\nNormal mode"));////MSG_CRASH_DET_ONLY_IN_NORMAL c=20 r=4
tim = _millis();
}
lcd_home();
lcd_puts_P(_i("Crash detection can\nbe turned on only in\nNormal mode"));////MSG_CRASH_DET_ONLY_IN_NORMAL c=20 r=4
menu_back_if_clicked();
}
static void lcd_crash_mode_info2()
{
lcd_update_enable(true);
static uint32_t tim = 0;
if ((tim + 1000) < _millis())
{
lcd_clear();
lcd_puts_P(_i("WARNING:\nCrash detection\ndisabled in\nStealth mode"));////MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4
tim = _millis();
}
lcd_home();
lcd_puts_P(_i("WARNING:\nCrash detection\ndisabled in\nStealth mode"));////MSG_CRASH_DET_STEALTH_FORCE_OFF c=20 r=4
menu_back_if_clicked();
}
#endif //TMC2130