wpilibsuite / xrp-wpilib-firmware

6 stars 7 forks source link

Update Encoder PIO algorithm #7

Closed zhiquanyeo closed 10 months ago

zhiquanyeo commented 10 months ago

The current PIO encoder reading algorithm only increments after a full cycle of A/B pins. Should be using the PIO algorithm from the XRPLib implementation (https://github.com/Open-STEM/XRP_MicroPython/blob/main/XRPLib/encoder.py) which provides 4x resolution (585 CPR)