The autonomous failure at Ryerson was due to the encoders being wired to different Talons on the practice and competition robots. However, a similar failure could occur for any number of reasons including encoders falling off (which happened in Stronghold) or damaged (Steamworks) and the same problem would occur if the encoder wires were cut or broken or if the Talon's Gadgeteer port were damaged.
final ErrorCode sensorPresent = talon.configSelectedFeedbackSensor(FeedbackDevice .CTRE_MagEncoder_Relative, 0, 100); //primary closed-loop, 100 ms timeout if (sensorPresent != ErrorCode.OK) { DriverStation.reportError("Could not detect " + (left ? "left" : "right") + " encoder: " + sensorPresent, false); }
Please implement a similar check on our drivetrain and lift encoders. Test by swapping the talon IDs temporarily and verify that it detects that the encoder isn't there.
We might even want to disallow autonomous driving commands if we think we've lost an encoder.
The autonomous failure at Ryerson was due to the encoders being wired to different Talons on the practice and competition robots. However, a similar failure could occur for any number of reasons including encoders falling off (which happened in Stronghold) or damaged (Steamworks) and the same problem would occur if the encoder wires were cut or broken or if the Talon's Gadgeteer port were damaged.
Check out what 254 does: https://github.com/Team254/FRC-2018-Public/blob/master/src/main/java/com/team254/frc2018/subsystems/Drive.java
final ErrorCode sensorPresent = talon.configSelectedFeedbackSensor(FeedbackDevice .CTRE_MagEncoder_Relative, 0, 100); //primary closed-loop, 100 ms timeout if (sensorPresent != ErrorCode.OK) { DriverStation.reportError("Could not detect " + (left ? "left" : "right") + " encoder: " + sensorPresent, false); }
Please implement a similar check on our drivetrain and lift encoders. Test by swapping the talon IDs temporarily and verify that it detects that the encoder isn't there.
We might even want to disallow autonomous driving commands if we think we've lost an encoder.