Since the error was not reproduced when the PDP sub-system was the only one in the project I figure it must be related to another module or some combination of them. I may have discovered what is triggering the timeout.
I have a zip file with the complete project code I can upload if that would help. This is the complete text received on the Eclipse console.Įrror at (Thread.java:748): CTRE CAN Receive Timeout. ent(Native Method) .PowerDistributionPanel.getCu rrent(PowerDistributionPanel.java:63) .PowerDistributionPanel.lambd a$initSendable$0(PowerDistributionPanel.java:116) .smartdashboard.SendableBuild erImpl.lambda$addDoubleProperty$3(SendableBuilderI mpl.java:211) .smartdashboard.SendableBuild erImpl.updateTable(SendableBuilderImpl.java:82). Values(LiveWindow.java:282) .IterativeRobotBase.loopFunc( IterativeRobotBase.java:227) .TimedRobot.lambda$new$0(Time dRobot.java:30) .Notifier.lambda$new$0(Notifi er.java:97) (Thread.java:748) I checked the CAN bus utilization on the driver station and it was 6%. Unlike the test program which only has the PDP subsystem this program has exactly the same problem with CAN timeout errors requesting the current once each teleop cycle. I reproduced last years robot code in its entirety and deployed it to the robot.
It may also be helpful to have the full project, though if it has significant usage of other CAN devices it may be difficult for us to assemble to appropriate platform to reproduce.Īfter creating a new project using the 2018 command based robot template. If that does work, it would be helpful to know what is reported for CAN Bus Utilization (found on the Lightening Bolt tab in the DS) when running the code that exhibits the issue.
If that doesn't work (I just tested it here to make sure that should work properly with the latest libraries), I would check the CAN bus wiring (potentially going directly from roboRIO to PDP to simplify for now, making sure that you are using twisted pair wiring and avoiding running near motors as much as possible, etc.) as well as verifying that the PDP is running firmware version 1.40 (though it sounds like you've already checked this from your first post).
In this case, that means creating a new project with one of those templates, adding a new PowerDistributionPanel object and then reading a single current off the object in something like teleopPeriodic (Iterative) or a loop in operatorControl (Sample). I recommend stripping things down to a SampleRobot or IterativeRobot project with as little code as possible to test the specific functionality in question to help track down the problem.