We are trying to get an angle from a Rev Through Bore encoder as an absolute encoder. We have the red white and black wires connected to the DIO port on the RoboRio.
We are using the DutyCycleEncoder class
m_angleEncoder.setDutyCycleRange(1/1024, 1023/1024);
m_angleEncoder.setDistancePerRotation(360);
m_angleEncoder.setPositionOffset(ARM_OFFSET_DEGREES);
We get NaN (Not a number) for the result when setting the dutyCycleRange
if we don’t set the duty cycle range we get we seem to get values 0 to 1. How is this supposed to be configured?