Navx-MXP AHRS error

Our kauailabs Navx-MXP is giving an error in the DriverStation after deploying code and following set up instructions:

ERROR Unhandled exception instantiating robot
 org.usfirst.frc.team5510.robot.Robot java.lang.NoClassDefFoundError:
 edu/wpi/first/wpilibj/PIDSourceType at 
[com.kauailabs.navx.frc.AHRS.<init>(AHRS.java:187),
 com.kauailabs.navx.frc.AHRS.<init>(AHRS.java:319),
 org.usfirst.frc.team5510.robot.Robot.<init>(Robot.java:56),
 sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method), sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62), 
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45), java.lang.reflect.Constructor.newInstance(Constructor.java:408),
 java.lang.Class.newInstance(Class.java:433), 
edu.wpi.first.wpilibj.RobotBase.main(RobotBase.java:197)]

We are still using the 2015 libraries if that matter. Any help would be greatly appreciated!

Your problem is that you are using the 2015 WPILib with a library that was designed for 2016. One of the things that changed in 2016 was that PIDSourceParameter was renamed to PIDSourceType.

Source: https://wpilib.screenstepslive.com/s/4485/m/13810/l/480120-c-java-changes-and-porting-guide-2015-to-2016

My recommendation is simply that you update your roboRIO, because you will have to do it eventually.

oh, will do right now. Thanks!

Hi,

When I try to compile my navX code on Eclipse using C++ it says “fatal error: AHRS.h: No such file or directory”

What can I do to fix it?

Inconceivable Programmers

You’ll need to follow the instructions to configure the Eclipse Library and Include Paths on the NavX-MXP C++ for Roborio Library page.