mirror of
https://github.com/Team4388/2023WayOfTheRobot.git
synced 2026-06-09 00:37:59 -06:00
Update RobotGyro.java
This commit is contained in:
@@ -28,6 +28,11 @@ public class RobotGyro implements Gyro {
|
||||
private double m_lastPigeonAngle;
|
||||
private double m_deltaPigeonAngle;
|
||||
|
||||
private double diff_Pitch = 0;
|
||||
private double diff_Yaw = 0;
|
||||
private double diff_Roll = 0;
|
||||
|
||||
|
||||
/**
|
||||
* Creates a Gyro based on a pigeon
|
||||
* @param gyro the gyroscope to use for Gyro
|
||||
@@ -46,6 +51,12 @@ public class RobotGyro implements Gyro {
|
||||
m_isGyroAPigeon = false;
|
||||
}
|
||||
|
||||
// Sets a
|
||||
//
|
||||
public void ResetAng() {
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* Run in periodic if you are using a pigeon. Updates a delta angle so that it can calculate getRate(). Note
|
||||
* that the getRate() method for a navX will likely be much more accurate than for a pigeon.
|
||||
@@ -100,7 +111,9 @@ public class RobotGyro implements Gyro {
|
||||
*/
|
||||
private double[] getPigeonAngles() {
|
||||
double[] angles = new double[3];
|
||||
m_pigeon.getYawPitchRoll(angles);
|
||||
m_pigeon.getPitch(angles);
|
||||
m_pigeon.getYaw(angles);
|
||||
m_pigeon.getRoll(angles);
|
||||
return angles;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user