wpilibsuite / allwpilib

Official Repository of WPILibJ and WPILibC
https://wpilib.org/
Other
1.03k stars 607 forks source link

Make encoder classes unit-aware #6746

Open calcmogul opened 2 weeks ago

calcmogul commented 2 weeks ago

Is your feature request related to a problem? Please describe. We currently have Encoder, AnalogEncoder, and DutyCycleEncoder. None of them are unit-safe.

Describe the solution you'd like To facilitate strong unit typing, we should split them all into linear and angular versions. I mocked up an API in C++ but never finished implementing the internals.

https://github.com/calcmogul/allwpilib/tree/_ref-new-encoder-api