A very basic IEncoderAdapter for slow GPIO Expanders.
This encoder adapter only checks for a single state change instead of the usual four in a quadrature encoder. This may provide more reliable events for where encoder movement is slow and/or the loop() cannot keep up.
|
| | SlowExpanderEncoderAdapter (uint8_t encoderPinA, uint8_t encoderPinB, GpioExpanderAdapter &expander) |
| | Construct a ExpanderEncoderAdapter. More...
|
| |
| bool | begin () override |
| | For compatibility with the Arduino library convention. More...
|
| |
| virtual int32_t | getPosition () override |
| | Get the current position of the encoder. More...
|
| |
| virtual void | setPosition (int32_t pos) |
| | Set the a new position of the encoder. For some libraries this may only allow it to be set to 0. More...
|
| |
|
virtual void | update () |
| | Update position using the table.
|
| |
|
virtual | ~IEncoderAdapter ()=default |
| | Destructor to ensure predictable behavious if derived classes are destroyed.
|
| |
| virtual bool | begin (void)=0 |
| | For compatibility with the Arduino library convention. More...
|
| |
| virtual int32_t | getPosition (void)=0 |
| | Get the current position as reported by the encoder class. More...
|
| |
| virtual void | setPosition (int32_t pos)=0 |
| | Set the a new position of the encoder. For some libraries this may only allow it to be set to 0. More...
|
| |