Add some logic to the encoder to only register a button press after a certain number of inputs.

This commit is contained in:
Anna Rose Wiggins 2021-12-21 04:16:07 +00:00
parent 4c5b51f7b8
commit 145e383bc5
5 changed files with 20 additions and 7 deletions

View file

@ -49,7 +49,7 @@ class Joystick {
void AddMatrixButton(uint8_t row, uint8_t col, Matrix* matrix, ButtonType type, bool pullup=true);
// Add a rotary encoder. ENCODER button types allow you to treat an encoder as a momentary button or an axis (TODO)
void AddEncoder(uint8_t pin1, uint8_t pin2, ButtonType type);
void AddEncoder(uint8_t pin1, uint8_t pin2, int8_t tick_threshold, ButtonType type);
// Add an analog axis to the joystick. THIS METHOD IS NOT CURRENTLY TESTED OR SUPPORTED. It might work, but probably not.
void AddAxis(uint8_t pin);