This year we added some gradle and java code to create a splash screen of sorts when the robot initializes. It prints a lot of version information so we can tell at a glance what software is actually running on the robot.
However, one thing that is missing that would have been useful is the version of WPILIB that is in use. With this version changing each year and all of our laptops and robots needing to be updated, it would be great if we could tell if we are using last year’s WPILIB or this years in the same way. Any idea how to get the version?
WPILibVersion class in the
edu.wpi.first.wpilibj.util package has a static field called
Version which contains the current WPILib version.
One thing to realize is that versions are managed on a per project basis. Thus if you copy a project to 5 computers which had different wpilib versions installed, when you build (and are connected to the internet) it will download the dependencies for the versions specified by the project. This works for both wpilib, as well as vendor dependencies.
That doesn’t work across years, which is why each computer needs the 2020 wpilib installed and projects imported, but once you get all computers up to 2020 it will work.
I know. I just want to capture at run time what is running on the RoboRio. I already capture a lot of buildtime info to print.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.