Our team purchased the REV Robotics MAXswerve modules in the offseason and so far we are very pleased with their construction quality. We are coding in Java and are using the Java Template provided by REV (https://github.com/REVrobotics/MAXSwerve-Java-Template/blob/main/src/main/java/frc/robot/Constants.java)
The only gyro we have available is the Kauai Labs NavX MPX . We made the appropriate changes in the code and redefined the gyro to be the NAVX instead of the ADIS16470 board. When we drive the robot for field centric driving, the heading is correct when we first start up. Once I start rotating it gets weird. If I turn 90 degrees to the right or left, the new zero heading is backwards from startup, (so controls are inverted). If we push the stick forward it goes backward. But if we turn the robot completely around from its original heading (180 degrees) then the heading is correct and all directions are correct. If we turn to any other angle, the headings are kinds of messed up. I am sure there is an easy fix somewhere but we are so inexperienced we are not sure where to start. Maybe someone could point me in the correct direction to start with a relatively straightforward fix. Thanks in advance.