public class RevIMU extends GyroEx
Constructor and Description |
---|
RevIMU(HardwareMap hw)
Create a new object for the built-in gyro/imu in the Rev Expansion Hub with the default configuration name of "imu"
|
RevIMU(HardwareMap hw,
java.lang.String imuName)
Create a new object for the built-in gyro/imu in the Rev Expansion Hub
|
Modifier and Type | Method and Description |
---|---|
void |
disable() |
double |
getAbsoluteHeading() |
double[] |
getAngles() |
java.lang.String |
getDeviceType() |
double |
getHeading() |
BNO055IMU |
getRevIMU()
Get the underlying sensor
|
Rotation2d |
getRotation2d() |
void |
init()
Initializes gyro with default parameters.
|
void |
init(BNO055IMU.Parameters parameters)
Initializes gyro with custom parameters.
|
void |
invertGyro()
Inverts the ouptut of gyro
|
void |
reset() |
public RevIMU(HardwareMap hw, java.lang.String imuName)
hw
- Hardware mapimuName
- Name of sensor in configurationpublic RevIMU(HardwareMap hw)
hw
- Hardware mappublic void init()
public void init(BNO055IMU.Parameters parameters)
public void invertGyro()
public double getHeading()
getHeading
in class GyroEx
public double getAbsoluteHeading()
getAbsoluteHeading
in class GyroEx
public double[] getAngles()
public Rotation2d getRotation2d()
getRotation2d
in class GyroEx
public void disable()
public java.lang.String getDeviceType()
public BNO055IMU getRevIMU()