Cant get rev swerve to work

Im new to programming, our last progrmmer left and I have no clue what im doing wrong. I imported the rev code into WPI VS code, then imported the REV API, however, it wont build. and now i also have new error codes that I wasnt getting when I did this with the 2023 tools 2 months ago.

if anyone could help thatd be great

Are you able to link your code?

I just used the rev code on their github
GitHub - REVrobotics/MAXSwerve-Java-Template

There were changes to the naming of the REV api functions. Release REVLib 2024.2.0 · REVrobotics/REV-Software-Binaries · GitHub

You’ll have to change the all the references that were changed. Also ensure you have the 2024 rev vendordep installed

Could also be issues related to WPILib 2024 mismatched with code from 2023. Do you happen to know if there is anything that would conflict?

The only changes I needed to make to the template were related to REV removing ‘Max’ from the api calls. The tool tips in the 2024 vendordep make the appropriate references to the new functions.

1 Like

So I updated the API to the 2024.2 version. However I still have all the same error code. One being “IdleMode not set to a type”, and other being “The import com.revrobotics.CANSparkMax.IdleMode cannot be resolved”

Try doing as KaseyB said and remove the ‘Max’ from that import. That contains the idle mode so it should fix both problems.

I’m super new, so I’m not sure how to do that. Do I just find the file and delete it?

Does the error say which file it is in?
The one with the error will appear red on the left.

Sorry, fist thing I said was wrong. It is in Constants.

Second thing was also wrong. Replace ‘Max’ with ‘Base’.

Check this commit. I’ve just made this repo and updated it to 2024 with the default gyroscope.

1 Like

Seeing it visually helped so much. Thank you so much for helping me. For future reference is there anywhere that lists these changes so I don’t have to resort to chief delphi?

Most vendors have a release system, in this case GitHub, that things are announced on.

Most of the time there is a CD thread to go along with the changes.

So I found the issue after finding this post:
[WPILib Blog] 2024 Kickoff Release of WPILib - Technical / Programming - Chief Delphi
Apparently thats both the fix for build.gradle, Kinematic values, and the get values you had replaced. But hopefully if anyone has my issue they can find both of you and that post just as helpful. Thank you both

1 Like

I’m having the same issue as you. So was it necessary to update the API to the 2024.2 version?

It is a good idea to always stay up to date with the vendor libraries. Installing online makes this easier and you can go Manage Vendor Libraries → Check For Updates (online). Currently the RevLib version is 2024.2.3.

1 Like

it was necessary to update API’s, I was also using the 2023 version of the code, which REV has updated. Beyond that there was a dev post that fixes gradle issues on new laptops, which I posted prior.

1 Like