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:
rmckay
2025-10-27 22:56:27 +00:00
committed by GitHub
parent 81afec9ea4
commit bf18851b6b
8 changed files with 144 additions and 64 deletions
+2
View File
@@ -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__*/