mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-27 00:35:59 -04:00
2nd-Level Encoder Debouncing for scrappy encoder dials (#1838)
* Experimental encoder debouncing * Experimental encoder debouncing * Clang * Comment changed
This commit is contained in:
parent
a2a5fb166e
commit
ee2e57d702
3 changed files with 45 additions and 71 deletions
|
@ -162,8 +162,7 @@ static bool switches_update(const uint8_t raw) {
|
|||
}
|
||||
|
||||
static bool encoder_update(const uint8_t raw) {
|
||||
// TODO: swap +1/-1 directions in encoder.update() to avoid needless swizzing of phase bits here
|
||||
return encoder_debounce.feed(((raw >> 7) & 0x01) | ((raw >> 5) & 0x02));
|
||||
return encoder_debounce.feed(raw >> 6);
|
||||
}
|
||||
|
||||
static bool encoder_read() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue