BroncBotz3481/YAGSL

CANCoder returns incorrect reading on boot

Closed this issue · 1 comments

You often need to retry multiple times in order to get a good reading. This all happens during bootup so normally in the disabled state so waiting a little longer is no problem. Even then going without a good CANCoder measurement will cause you to drag a wheel which is just bad.

Link to democat code

Should be fixed now. I modified SwerveModule.java:238-246 with a fallback of the relative encoder. Also modified CANCoderSwerve.java:85-127 by copying and crediting democat.