Can anyone help me find the problem in my code that is giving me the error?
Any help is appreciated!
here is the link to our github
Can anyone help me find the problem in my code that is giving me the error?
Any help is appreciated!
here is the link to our github
Is it saying that all the time (continuously), once on program startup, or only when you do certain things (e.g. does it only happen in auto? teleop?)?
it happens all the time and we cannot drive
it happens all the time and we cannot drive
Firstly it seems that you aren’t on the latest version of WPILib which I’m pretty sure will be required for competition. Your code looks like it should work, so have you checked CAN bus connections and power cables to all the motors? You could also try using the REV hardware client to run the motors and seeing if you can get them to spin, so at least you can be sure your motors are wired to the CAN bus and have power.
I’m pretty sure we are on the right version but I’m not 100% sure. Do you know where I can check that? On the other hand I didn’t realize I was calling the wrong can ID’s in the code. I’m just about to try it right now.
Also instead of using “driveSubsystem.setDefaultCommand(driveCommand);”
we are trying “CommandScheduler.getInstance().setDefaultCommand(driveSubsystem, driveCommand);”
Your bulld.gradle says that your version is 2021 build.gradle. You also are using the old 2021 Xbox controller methods, in 2022 they made all of the Xbox methods static WPI Changelog. driveSubsystem.setDefaultCommand(driveCommand);
vs
CommandScheduler.getInstance().setDefaultCommand(driveSubsystem, driveCommand);
is mostly a matter of preference, as both should work fine
It all works fine now thank you! We are installing 2022 now.
Thanks again for the help!
2PawRobotics
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.