Team3487-RedPrideRobotics / Wattson

Team 3487 Robot Code for the 2023 Season
Other
1 stars 0 forks source link

Navx #7

Closed Silicasandwhich closed 1 year ago

Silicasandwhich commented 1 year ago
argylearson commented 1 year ago

Just saw this: https://pdocs.kauailabs.com/navx-mxp/software/roborio-libraries/

"[Update: 1/7/2022 – Version 4.0.442 is now available – which is compatible with the FRC WPILib 2022 Release Candidate 1. For more details on installation, see the page corresponding to your chosen development language.]"

Silicasandwhich commented 1 year ago

So the things is that the last update to the SimDevice.java file was June 3rd, 2022, and it removed the deprecated create[datatype]() functions used by the distributed version, so the 1/7/22 update to the navx libraries wouldn't be made for compatibility with that version of the file. Furthermore, the final WPILib 2022 release was in February of 2022, so the update to SimDevice.java wouldn't have broken compatibility with navx that year. So, in total, if the most up-to-date version was made in 1/7/22, we do indeed need to use our manually-patched version

argylearson commented 1 year ago

Gotcha. Hmm, if it's just a runtime error and not a compile error, does wrapping the calls to the NavX in if (Robot.IsReal()) fix the issue?

Silicasandwhich commented 1 year ago

I think the only reason it's not a compilation issue is because of how third party libraries are distributed (via maven, meaning they're precompiled). Additionally, the simulation issues weren't the only problem, there was also the call to RuntimeDetector.isRaspbian() in the constructor, which means that simply having an AHRS in your code will cause runtime errors no matter what.

Silicasandwhich commented 1 year ago

progress as of now:

Silicasandwhich commented 1 year ago

going to merge this for now so that the main branch doesn't runtime error, but ill open it again