Disable long press handler in modal dialogs (LCD update disabled).

This commit is contained in:
Marek Bel 2018-11-06 20:43:19 +01:00
parent c3bdd21fa5
commit 676434111e

View file

@ -783,14 +783,14 @@ void lcd_buttons_update(void)
safetyTimer.start(); safetyTimer.start();
if ((lcd_button_pressed == 0) && (lcd_long_press_active == 0)) if ((lcd_button_pressed == 0) && (lcd_long_press_active == 0))
{ {
//long press is not possible in modal mode longPressTimer.start();
if (lcd_update_enabled) longPressTimer.start();
lcd_button_pressed = 1; lcd_button_pressed = 1;
} }
else if (longPressTimer.expired(LONG_PRESS_TIME)) else if (longPressTimer.expired(LONG_PRESS_TIME))
{ {
lcd_long_press_active = 1; lcd_long_press_active = 1;
if (lcd_longpress_func) //long press is not possible in modal mode
if (lcd_longpress_func && lcd_update_enabled)
lcd_longpress_func(); lcd_longpress_func();
} }
} }