mirror of
https://github.com/eried/portapack-mayhem.git
synced 2025-07-19 21:19:11 -04:00
Add the feature to decide rotate direction of encoder (#2472)
This commit is contained in:
parent
dfa35b4290
commit
55db0e8c87
6 changed files with 49 additions and 17 deletions
|
@ -66,6 +66,11 @@ int_fast8_t Encoder::update(const uint_fast8_t phase_bits) {
|
|||
if (direction == prev_direction) {
|
||||
if ((sensitivity_map[portapack::persistent_memory::encoder_dial_sensitivity()] & (1 << state)) == 0)
|
||||
return 0;
|
||||
|
||||
// true: normal, false: reverse
|
||||
if (!portapack::persistent_memory::encoder_dial_direction())
|
||||
direction = -direction;
|
||||
|
||||
return direction;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue