add torch

This commit is contained in:
taco
2026-05-10 03:08:08 +10:00
parent 8540c98947
commit 9f683975c1
6 changed files with 27 additions and 1 deletions

View File

@@ -643,6 +643,15 @@ void UITask::loop() {
next_backlight_btn_check = millis() + 300;
}
#endif
#if defined(HAS_TORCH)
ev = back_btn.check();
if (ev == BUTTON_EVENT_CLICK && c == 0) {
c = checkDisplayOn(KEY_PREV);
} else if (ev == BUTTON_EVENT_DOUBLE_CLICK) {
board.toggleTorch();
c = 0;
}
#endif
if (c != 0 && curr) {
curr->handleInput(c);