wpilibsuite / 2024Beta

Repository for Beta Testing of 2024 Software
32 stars 5 forks source link

REVLib SimDevice has confusing naming and doesn't support the AbsoluteEncoder. #17

Open bznerd opened 10 months ago

bznerd commented 10 months ago

The SimDevice's are named "SPARK MAX " with a trailing space. The additional space is easy to overlook and can cause errors when constructing a SimDeviceSim object. Removing the space would be more consistent with the naming scheme used by WPILib.

Additionally, there is no way to set the value returned for position or velocity from the AbsoluteEncoder object returned by CANSparkMax.getAbsoluteEncoder() when running in sim. In sim, the getPosition() and getVelocity() methods return random values. Ideally this would have a sim value that could be set by the user.

Overall, increased simulation support in REVLib would be a very welcome addition.