* 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

@ -23,7 +23,7 @@ class MomentaryButton {
bool isPressed(int level) const;
public:
MomentaryButton(int8_t pin, int long_press_mills=0, bool reverse=false, bool pulldownup=false);
MomentaryButton(int8_t pin, int long_press_mills=0, bool reverse=false, bool pulldownup=false, bool multiclick=true);
MomentaryButton(int8_t pin, int long_press_mills, int analog_threshold);
void begin();
int check(bool repeat_click=false); // returns one of BUTTON_EVENT_*