mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-19 06:21:40 +00:00
Updated to 2024
This commit is contained in:
@@ -2,6 +2,7 @@ package swervelib.imu;
|
||||
|
||||
import edu.wpi.first.math.geometry.Rotation3d;
|
||||
import edu.wpi.first.math.geometry.Translation3d;
|
||||
import edu.wpi.first.wpilibj.ADIS16470_IMU.IMUAxis;
|
||||
import edu.wpi.first.wpilibj.ADIS16470_IMU;
|
||||
import edu.wpi.first.wpilibj.smartdashboard.SmartDashboard;
|
||||
import java.util.Optional;
|
||||
@@ -38,9 +39,8 @@ public class ADIS16470Swerve extends SwerveIMU
|
||||
@Override
|
||||
public void factoryDefault()
|
||||
{
|
||||
offset = new Rotation3d(
|
||||
Math.toRadians(imu.getYComplementaryAngle()), Math.toRadians(imu.getXComplementaryAngle()),
|
||||
Math.toRadians(imu.getAngle()));
|
||||
offset = new Rotation3d(0, 0, 0);
|
||||
imu.calibrate();
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -69,9 +69,7 @@ public class ADIS16470Swerve extends SwerveIMU
|
||||
*/
|
||||
public Rotation3d getRawRotation3d()
|
||||
{
|
||||
return new Rotation3d(
|
||||
Math.toRadians(imu.getYComplementaryAngle()), Math.toRadians(imu.getXComplementaryAngle()),
|
||||
Math.toRadians(imu.getAngle()));
|
||||
return new Rotation3d(0, 0, Math.toRadians(-imu.getAngle(IMUAxis.kYaw)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user