First SparkMax initialization on CAN fails

We have been having an issue on and off with the first sparkmax we initialize on the CAN bus.

The first motor we initialized for some reason had the power reversed sometimes. Usually gave some sort of weird can fault in the driver station, ranging from “can buffer overload” to “can firmware not found” or something along those lines. Adding a dummy motor to be initialized before the other ones fixed everything but still returned a firmware error for the dummy motor (did not affect rest of code negatively aside from that).

We are wondering if there is a specific reason this is happening, and if there is a better way to actually fix this issue. For note, our CAN utilization is steady at 85%

Code with the dummy motor can be found inside the robot init function on our github: 7407-DriveCode-ChargedUp/ at comp/se_mass/dev · Choate-Robotics/7407-DriveCode-ChargedUp · GitHub

We are getting this too, albeit at a far lower CAN utilization rate of ~55%. It’s very frustrating. Our “fix” has been to set inversion 30 times in a for loop.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.