mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-24 18:23:08 +00:00
Fix Rotary Encoder Button (#8001)
this fixes the Rotary Encoder Button, currenlty its not working at all. Currently the action `ROTARY_ACTION_PRESSED` is only triggerd with a IRQ on RISING, which results in nothing since the function detects the "not longer" pressed button --> no action. the `ROTARY_ACTION_PRESSED` implementation needs to be called on both edges (on press and release of the button) changing the interupt setting to `CHANGE` fixes the problem.
This commit is contained in:
parent
c42513d7c8
commit
27b07cd1c5
@ -25,7 +25,7 @@ void RotaryEncoderInterruptBase::init(
|
|||||||
|
|
||||||
if (!isRAK || pinPress != 0) {
|
if (!isRAK || pinPress != 0) {
|
||||||
pinMode(pinPress, INPUT_PULLUP);
|
pinMode(pinPress, INPUT_PULLUP);
|
||||||
attachInterrupt(pinPress, onIntPress, RISING);
|
attachInterrupt(pinPress, onIntPress, CHANGE);
|
||||||
}
|
}
|
||||||
if (!isRAK || this->_pinA != 0) {
|
if (!isRAK || this->_pinA != 0) {
|
||||||
pinMode(this->_pinA, INPUT_PULLUP);
|
pinMode(this->_pinA, INPUT_PULLUP);
|
||||||
|
Loading…
Reference in New Issue
Block a user