Swerve Programming Help

Hello, I need help with programming our swerve. This is our first time using swerve; we are using MK4i, spark max, and CTR CAN encoder. We took the base code from someone using similar hardware to us. I made sure that everything had the proper ID’s and to switch everything to what we needed this is our code.

When we go on the drive station we get a few warnings:

Any help is appreciated!

Here is the video.

Welcome to Chief Delphi!

Any chance you could post a full list of the errors you’re getting?
In the mean time I’ll look through your code.

Upon trying to run a simulation with your code, I’m getting this error:


You can solve this by running the “Set Team Number” command in VS Code:
image

After doing that, I tried again and after looking great up until the end, I got this error which I’m unsure about:
image

I also noticed that your vendor dependencies are still in the 2023 versions. Have you updated your RoboRIO, your CANCoders, and your SPARK Max motor controllers to the latest firmware? Everything has to be on the same version, so if anything is 2024 in a 2023 project, I don’t think it will work. If all of your software and firmware is 2023, you should be fine for now but I believe you’ll need to update everything before your competition, and I recommend you do it sooner rather than later as CTRE has made some changes with the CANCoders that broke our swerve code when we updated.

Again, it will be helpful to see the full list of errors.

Thanks, I will double check to make sure to double check that everything is updated.

Here’s the message log for all the errors.