Moved gyro calibration into a separate function so teams can recalibrate at any time after construction

Change-Id: I6c43af3ad8e21dcc82dded61f0cd0ae2ddbe0965
This commit is contained in:
Tyler Veness
2015-07-20 10:54:10 -04:00
parent aa95a8c299
commit 9b4dd268b0
6 changed files with 80 additions and 91 deletions

View File

@@ -10,14 +10,14 @@ package edu.wpi.first.wpilibj.interfaces;
*/
public interface Gyro {
/**
* Initialize the gyro. Calibrate the gyro by running for a number of samples
* and computing the center value. Then use the center value as the
* Accumulator center value for subsequent measurements. It's important to
* make sure that the robot is not moving while the centering calculations are
* in progress, this is typically done when the robot is first turned on while
* it's sitting at rest before the competition starts.
* Calibrate the gyro by running for a number of samples and computing the
* center value. Then use the center value as the Accumulator center value for
* subsequent measurements. It's important to make sure that the robot is not
* moving while the centering calculations are in progress, this is typically
* done when the robot is first turned on while it's sitting at rest before
* the competition starts.
*/
public void initGyro();
public void calibrate();
/**
* Reset the gyro. Resets the gyro to a heading of zero. This can be used if