mirror of
https://github.com/meshtastic/firmware.git
synced 2025-12-21 02:02:23 +00:00
Add a debounce time parameter and use it in the runOnce method to debounce the key.
This commit is contained in:
committed by
Jonathan Bennett
parent
7a38368494
commit
8ba98ae873
@@ -21,8 +21,9 @@ bool UpDownInterruptImpl1::init()
|
||||
input_broker_event eventUp = INPUT_BROKER_UP;
|
||||
input_broker_event eventPressed = INPUT_BROKER_SELECT;
|
||||
|
||||
unsigned long debounceMs = moduleConfig.canned_message.rotary1_enabled ? 100 : 300;
|
||||
UpDownInterruptBase::init(pinDown, pinUp, pinPress, eventDown, eventUp, eventPressed, UpDownInterruptImpl1::handleIntDown,
|
||||
UpDownInterruptImpl1::handleIntUp, UpDownInterruptImpl1::handleIntPressed);
|
||||
UpDownInterruptImpl1::handleIntUp, UpDownInterruptImpl1::handleIntPressed, debounceMs);
|
||||
inputBroker->registerSource(this);
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user