Update RobotGyro.java

This commit is contained in:
Astatin3
2023-01-10 18:54:58 -07:00
parent caf45c1431
commit 162670bec0
+14 -1
View File
@@ -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;
}