mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-28 07:01:39 +00:00
Updated swervelib
This commit is contained in:
39
swervelib/imu/SwerveIMU.java
Normal file
39
swervelib/imu/SwerveIMU.java
Normal file
@@ -0,0 +1,39 @@
|
||||
package frc.robot.subsystems.swervedrive2.swervelib.imu;
|
||||
|
||||
/**
|
||||
* Swerve IMU abstraction to define a standard interface with a swerve drive.
|
||||
*/
|
||||
public abstract class SwerveIMU
|
||||
{
|
||||
|
||||
/**
|
||||
* Reset IMU to factory default.
|
||||
*/
|
||||
public abstract void factoryDefault();
|
||||
|
||||
/**
|
||||
* Clear sticky faults on IMU.
|
||||
*/
|
||||
public abstract void clearStickyFaults();
|
||||
|
||||
/**
|
||||
* Set the yaw in degrees.
|
||||
*
|
||||
* @param yaw Yaw angle in degrees.
|
||||
*/
|
||||
public abstract void setYaw(double yaw);
|
||||
|
||||
/**
|
||||
* Fetch the yaw/pitch/roll from the IMU.
|
||||
*
|
||||
* @param yprArray Array which will be filled with {yaw, pitch, roll} in degrees.
|
||||
*/
|
||||
public abstract void getYawPitchRoll(double[] yprArray);
|
||||
|
||||
/**
|
||||
* Get the instantiated IMU object.
|
||||
*
|
||||
* @return IMU object.
|
||||
*/
|
||||
public abstract Object getIMU();
|
||||
}
|
||||
Reference in New Issue
Block a user