mirror of
https://github.com/portapack-mayhem/mayhem-firmware.git
synced 2026-09-07 07:19:07 +00:00
Additional debounce control parameters for rotary encoder settings (for bad/noisy encoders) (#2841)
* Added debounce control options for rotary encoder settings * ran format-code.sh to adjust whitespace --------- Co-authored-by: Robert McKay <robert.mckay@ubermorgen.land>
This commit is contained in:
@@ -32,6 +32,8 @@ class Encoder {
|
||||
private:
|
||||
uint_fast8_t state{0};
|
||||
int_fast8_t prev_direction{0};
|
||||
uint8_t direction_stability_count{0}; // count consecutive same-direction changes
|
||||
uint8_t direction_cooldown{0}; // prevent rapid direction reversals
|
||||
};
|
||||
|
||||
#endif /*__ENCODER_H__*/
|
||||
|
||||
Reference in New Issue
Block a user