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.
The
SimDevice
's are named"SPARK MAX "
with a trailing space. The additional space is easy to overlook and can cause errors when constructing aSimDeviceSim
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 byCANSparkMax.getAbsoluteEncoder()
when running in sim. In sim, thegetPosition()
andgetVelocity()
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.