* UITask: new UI_HAS_JOYSTICK

* MomentaryButton: new constructor 'multiclick' param
* WIoTrackerL1: now just use joystick, joystick press for KEY_ENTER, no multi-click for snappier UI
This commit is contained in:
Scott Powell 2025-10-16 17:33:22 +11:00
parent d3be6afccb
commit cd920693ec
7 changed files with 32 additions and 18 deletions

View file

@ -63,6 +63,7 @@ build_flags = ${WioTrackerL1.build_flags}
-D MAX_CONTACTS=350
-D MAX_GROUP_CHANNELS=40
-D DISPLAY_CLASS=SH1106Display
-D UI_HAS_JOYSTICK=1
-D OFFLINE_QUEUE_SIZE=256
-D PIN_BUZZER=12
-D QSPIFLASH=1
@ -91,6 +92,7 @@ build_flags = ${WioTrackerL1.build_flags}
-D BLE_DEBUG_LOGGING=1
-D OFFLINE_QUEUE_SIZE=256
-D DISPLAY_CLASS=SH1106Display
-D UI_HAS_JOYSTICK=1
-D PIN_BUZZER=12
-D QSPIFLASH=1
; -D MESH_PACKET_LOGGING=1

View file

@ -21,9 +21,10 @@ EnvironmentSensorManager sensors = EnvironmentSensorManager();
#ifdef DISPLAY_CLASS
DISPLAY_CLASS display;
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
MomentaryButton joystick_left(JOYSTICK_LEFT, 1000, true);
MomentaryButton joystick_right(JOYSTICK_RIGHT, 1000, true);
MomentaryButton user_btn(PIN_USER_BTN, 1000, true, false, false);
MomentaryButton joystick_left(JOYSTICK_LEFT, 1000, true, false, false);
MomentaryButton joystick_right(JOYSTICK_RIGHT, 1000, true, false, false);
MomentaryButton back_btn(PIN_BACK_BTN, 1000, true, false, false);
#endif
bool radio_init() {

View file

@ -27,6 +27,7 @@ extern EnvironmentSensorManager sensors;
extern MomentaryButton user_btn;
extern MomentaryButton joystick_left;
extern MomentaryButton joystick_right;
extern MomentaryButton back_btn;
#endif
bool radio_init();

View file

@ -31,12 +31,13 @@
#define PIN_BUTTON4 (27) // Joystick Left
#define PIN_BUTTON5 (28) // Joystick Right
#define PIN_BUTTON6 (29) // Joystick Press
#define PIN_USER_BTN PIN_BUTTON1
#define PIN_BACK_BTN PIN_BUTTON1
#define JOYSTICK_UP PIN_BUTTON2
#define JOYSTICK_DOWN PIN_BUTTON3
#define JOYSTICK_LEFT PIN_BUTTON4
#define JOYSTICK_RIGHT PIN_BUTTON5
#define JOYSTICK_PRESS PIN_BUTTON6
#define PIN_USER_BTN PIN_BUTTON6
// Buzzer
// #define PIN_BUZZER (12) // Buzzer pin (defined per firmware type)