Updated to 2024

This commit is contained in:
thenetworkgrinch
2024-01-15 14:37:13 -06:00
parent 3fd8493ccb
commit a71d7a0b4e
185 changed files with 6910 additions and 10987 deletions

View File

@@ -96,10 +96,7 @@ public class NavXSwerve extends SwerveIMU
public void factoryDefault()
{
// gyro.reset(); // Reported to be slow
offset = new Rotation3d(new Quaternion(gyro.getQuaternionW(),
gyro.getQuaternionX(),
gyro.getQuaternionY(),
gyro.getQuaternionZ()));
offset = gyro.getRotation3d();
}
/**
@@ -125,13 +122,10 @@ public class NavXSwerve extends SwerveIMU
*
* @return {@link Rotation3d} from the IMU.
*/
@Override
public Rotation3d getRawRotation3d()
{
return new Rotation3d(new Quaternion(gyro.getQuaternionW() * 0.5,
gyro.getQuaternionX() * 0.5,
gyro.getQuaternionY() * 0.5,
gyro.getQuaternionZ() *
0.5)); // TODO: Remove when Studica's official release is made.
return gyro.getRotation3d();
}
/**
@@ -142,7 +136,7 @@ public class NavXSwerve extends SwerveIMU
@Override
public Rotation3d getRotation3d()
{
return getRawRotation3d().minus(offset);
return gyro.getRotation3d().minus(offset);
}
/**