Package frc.robot.subsystems.drive.gyro
Interface GyroIO
- All Known Implementing Classes:
GyroIOCanAndGyro,GyroIODual,GyroIONavX
public interface GyroIO
Interface for the gyroscope input/output abstraction.
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic classContains all of the inputs received from the gyro hardware. -
Method Summary
Modifier and TypeMethodDescriptiondefault voidClears all faults and warnings.default voidsetRotation(Rotation3d rotation) Sets the gyro's rotation to the specified angle.default IMUStateupdateHighFreq(double timestampSec) Polls high-frequency data for the 200Hz odometry loop.default voidupdateInputs(GyroIO.GyroIOInputs inputs) Updates the set of loggable inputs.
-
Method Details
-
updateInputs
Updates the set of loggable inputs.- Parameters:
inputs- The inputs object to update.
-
updateHighFreq
Polls high-frequency data for the 200Hz odometry loop.- 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.
-
clearFaults
default void clearFaults()Clears all faults and warnings. -
setRotation
Sets the gyro's rotation to the specified angle.- Parameters:
rotation- The angle to set the gyro's rotation to.
-