Skip to content

Commit

Permalink
Merge pull request #4461 from gudnimg/lcd-opt-message
Browse files Browse the repository at this point in the history
optimisation: simplify two LCD messages
  • Loading branch information
gudnimg authored Nov 16, 2023
2 parents 3810406 + 469f002 commit 400722e
Showing 1 changed file with 4 additions and 16 deletions.
20 changes: 4 additions & 16 deletions Firmware/ultralcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 400722e

Please sign in to comment.