RR FTC Version
0.1.20
Observed Behavior
The robot would sometimes loose control of a wheel. It wasn't an electrical issue as on another control hub or even in the expansion hub it worked fine. If the dead wheels encoder wires were plugged in, the robot would move using only three wheels, as if one isn't used. But if I removed the encoder wires from the control hub sockets, the problem disapears. I fixed this strange behaviour by going in MecannumDrive.java and adding these lines to explicitly set the motor mode to RUN_WITHOUT_ENCODER:
leftBack.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
leftFront.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
rightBack.setMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
rightFrontsetMode(DcMotor.RunMode.RUN_WITHOUT_ENCODER);
right after https://github.com/acmerobotics/road-runner-quickstart/blob/master/TeamCode/src/main/java/org/firstinspires/ftc/teamcode/MecanumDrive.java#L236
I think the code doesn't explicitly disable them if you use any other type of localisers besides drive encoders.
Tuning Files
No response
Robot Logs
No response