|
@ -46,7 +46,7 @@ bool BaseScreen::buttonStyleCallback(CommandProcessor &cmd, uint8_t tag, uint8_t |
|
|
return false; |
|
|
return false; |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#if LCD_TIMEOUT_TO_STATUS |
|
|
#if LCD_TIMEOUT_TO_STATUS > 0 |
|
|
if (EventLoop::get_pressed_tag() != 0) { |
|
|
if (EventLoop::get_pressed_tag() != 0) { |
|
|
reset_menu_timeout(); |
|
|
reset_menu_timeout(); |
|
|
} |
|
|
} |
|
@ -66,7 +66,7 @@ bool BaseScreen::buttonStyleCallback(CommandProcessor &cmd, uint8_t tag, uint8_t |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void BaseScreen::onIdle() { |
|
|
void BaseScreen::onIdle() { |
|
|
#if LCD_TIMEOUT_TO_STATUS |
|
|
#if LCD_TIMEOUT_TO_STATUS > 0 |
|
|
if ((millis() - last_interaction) > LCD_TIMEOUT_TO_STATUS) { |
|
|
if ((millis() - last_interaction) > LCD_TIMEOUT_TO_STATUS) { |
|
|
reset_menu_timeout(); |
|
|
reset_menu_timeout(); |
|
|
#if ENABLED(TOUCH_UI_DEBUG) |
|
|
#if ENABLED(TOUCH_UI_DEBUG) |
|
@ -78,12 +78,12 @@ void BaseScreen::onIdle() { |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
void BaseScreen::reset_menu_timeout() { |
|
|
void BaseScreen::reset_menu_timeout() { |
|
|
#if LCD_TIMEOUT_TO_STATUS |
|
|
#if LCD_TIMEOUT_TO_STATUS > 0 |
|
|
last_interaction = millis(); |
|
|
last_interaction = millis(); |
|
|
#endif |
|
|
#endif |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#if LCD_TIMEOUT_TO_STATUS |
|
|
#if LCD_TIMEOUT_TO_STATUS > 0 |
|
|
uint32_t BaseScreen::last_interaction; |
|
|
uint32_t BaseScreen::last_interaction; |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|