We are trying to use a relative and absolute encoder on a steer motor for a swerve drive. When we attempt to pass a sensor position through .setPosition we are getting the following error.
[CAN SPARK] IDs: 1, 4, 6, 7, timed out while waiting for Periodic Status 2.
If we comment out the line
steerEncoder.setPosition((getAbsAngleDeg() * quadCountsPerRotation) / 360);
Are you trying to set the position of an absolute encoder?
If so, that doesn’t work, you’re not meant to set the position on an absolute encoder. At most, you can set the offset, to change it’s zero position using the REV Hardware Client.
No, it is a quadrature encoder the issue is were confused why only when we try and set a position on it or set a scale on the position it gives the error
Quadrature encoders are not absolute encoders and are not as reliable, they start with 0 not any internal reading. You would have to realign your wheels at the start.
these we used them last year with no issue at all but this year we switched to using SPARKmaxes from Talon SRX which have different implementations but should still work
were using the alternate encoder adapters but we have the breakout boards. we were printing out values through smart dash but it wouldnt set position but when we switched some stuff from just RelativeEncoder to AlternateEncoder it stopped giving errors for set position but also stopped printing values on smart dash.
So from what I understand it mostly means that there is to much going on slash to much clutter so maybe try and clean the code up to make it run smoother but we fixed it by straight up getting new swerve drives(we were doing that anyway not to fix the problem)