Package frc.robot.subsystems.drive.gyro
Class GyroIOCanAndGyro
java.lang.Object
frc.robot.subsystems.drive.gyro.GyroIOCanAndGyro
- All Implemented Interfaces:
GyroIO
IO implementation for the Redux Robotics Canandgyro.
-
Nested Class Summary
Nested classes/interfaces inherited from interface frc.robot.subsystems.drive.gyro.GyroIO
GyroIO.GyroIOInputs -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidClears all faults and warnings.voidsetRotation(Rotation3d rotation) Sets the gyro's rotation to the specified angle.updateHighFreq(double timestampSec) Polls high-frequency data for the 200Hz odometry loop.voidupdateInputs(GyroIO.GyroIOInputs inputs) Updates the set of loggable inputs.
-
Constructor Details
-
GyroIOCanAndGyro
public GyroIOCanAndGyro()Creates a new GyroIOCanAndGyro.
-
-
Method Details
-
updateHighFreq
Description copied from interface:GyroIOPolls high-frequency data for the 200Hz odometry loop.- Specified by:
updateHighFreqin interfaceGyroIO- Parameters:
timestampSec- The exact timestamp of the current 200Hz tick.- Returns:
- The latest 6-DOF IMU state or null if the data is not available.
-
updateInputs
Description copied from interface:GyroIOUpdates the set of loggable inputs.- Specified by:
updateInputsin interfaceGyroIO- Parameters:
inputs- The inputs object to update.
-
clearFaults
public void clearFaults()Description copied from interface:GyroIOClears all faults and warnings.- Specified by:
clearFaultsin interfaceGyroIO
-
setRotation
Description copied from interface:GyroIOSets the gyro's rotation to the specified angle.- Specified by:
setRotationin interfaceGyroIO- Parameters:
rotation- The angle to set the gyro's rotation to.
-