WioTrackerL1: add joystick left and right for new UI

This commit is contained in:
taco 2025-08-17 19:01:28 +10:00
parent 8f1ccb65ae
commit cb8ca91d27
3 changed files with 18 additions and 0 deletions

View file

@ -494,6 +494,20 @@ void UITask::loop() {
c = handleLongPress(KEY_ENTER);
}
#endif
#if defined(WIO_TRACKER_L1)
ev = joystick_left.check();
if (ev == BUTTON_EVENT_CLICK) {
c = checkDisplayOn(KEY_LEFT);
} else if (ev == BUTTON_EVENT_LONG_PRESS) {
c = handleLongPress(KEY_LEFT);
}
ev = joystick_right.check();
if (ev == BUTTON_EVENT_CLICK) {
c = checkDisplayOn(KEY_RIGHT);
} else if (ev == BUTTON_EVENT_LONG_PRESS) {
c = handleLongPress(KEY_RIGHT);
}
#endif
if (c != 0 && curr) {
curr->handleInput(c);