mirror of
https://github.com/meshcore-dev/MeshCore.git
synced 2026-04-20 22:13:47 +00:00
techo: display backlight behavior
This commit is contained in:
parent
1a41da6bf2
commit
3cdf2f9b4d
3 changed files with 12 additions and 2 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue