techo: display backlight behavior
This commit is contained in:
1 parent
1a41da6bf2
commit
3cdf2f9b4d
3 files changed
+12
-2
No files matched your search
@@ -519,6 +519,14 @@ void UITask::loop() {
|
||||
c = handleLongPress(KEY_ENTER);
|
||||
}
|
||||
#endif
|
||||
#if defined(DISP_BACKLIGHT) && defined(BACKLIGHT_BTN)
|
||||
static int next_btn_check = 0;
|
||||
if (millis() > next_btn_check) {
|
||||
bool touch_state = digitalRead(PIN_BUTTON2);
|
||||
digitalWrite(DISP_BACKLIGHT, !touch_state);
|
||||
next_btn_check = millis() + 300;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (c != 0 && curr) {
|
||||
curr->handleInput(c);
|
||||
|
||||
Reference in new issue
Block a user