Can't deploy robot code, CAN SparkMax instance already created

We recently switched over to VSCode and we’re trying to run a neo 550 with a SparkMax Controller. We don’t have build issues, but the code won’t deploy.
Heres the link for a code snippet: Instance of creating SparkMax Contrller @ line 61 · GitHub

It’s telling you the problem in the riolog console output: somewhere your code is creating two CANSparkMax instances with the same id of 2. We’d have to see more of your code to help you find it. My guess is you’re creating another instance in RobotInit duplicate of the one being created in the header file.

Here’s the link to our Github

Your Chassis class has Robot as a base class, so Robot’s members are being constructed twice (once when Chassis is instantiated and once when Robot is instantiated).

I see, thank you.

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