Open drewwhis opened 4 years ago
private ADIS16470_IMU mGyro = new ADIS16470_IMU();
should be how to instantiate it
mGyro.reset()
can be called when the robot is facing forward to zero out the gyro.
It reads like the default axis of rotation is when the gyro/roboRIO are mounted flat, facing upward, so we won't need to configure that.
We may want to add a button on Shuffleboard and a command to zero the gyro. Note that the gyro should ONLY be zeroed when the robot is on the field facing directly forward.
Actually, we may just want to zero the gyro every match. We could do that during the start of autonomous.
Looks like this isn't done after all.
We have a gyro attached to the robot but we're not doing anything with it right now.
We could easily add it to the Swerve Drive Subsystem and zero it on initialize. Then we could easily rotate until it reads the value we want it to read.
Example: https://github.com/juchong/ADIS16470-RoboRIO-Driver-Examples/blob/master/java/src/main/java/frc/robot/Robot.java