* MomentaryButton: added support for analog button (with threshold)

* RAK: support for PIN_USER_BTN_ANA
This commit is contained in:
Scott Powell 2025-09-01 17:11:55 +10:00
parent b8223e9d07
commit 74722c24b8
5 changed files with 39 additions and 3 deletions

View file

@ -11,6 +11,10 @@ RAK4631Board board;
#ifdef DISPLAY_CLASS
DISPLAY_CLASS display;
MomentaryButton user_btn(PIN_USER_BTN, 1000, true);
#if defined(PIN_USER_BTN_ANA)
MomentaryButton analog_btn(PIN_USER_BTN_ANA, 1000, 20);
#endif
#endif
RADIO_CLASS radio = new Module(P_LORA_NSS, P_LORA_DIO_1, P_LORA_RESET, P_LORA_BUSY, SPI);

View file

@ -13,6 +13,9 @@
extern DISPLAY_CLASS display;
#include <helpers/ui/MomentaryButton.h>
extern MomentaryButton user_btn;
#if defined(PIN_USER_BTN_ANA)
extern MomentaryButton analog_btn;
#endif
#endif
extern RAK4631Board board;