Class GyroIOCanAndGyro

java.lang.Object
frc.robot.subsystems.drive.gyro.GyroIOCanAndGyro
All Implemented Interfaces:
GyroIO

public class GyroIOCanAndGyro extends Object implements GyroIO
IO implementation for the Redux Robotics Canandgyro.
  • Constructor Details

    • GyroIOCanAndGyro

      public GyroIOCanAndGyro()
      Creates a new GyroIOCanAndGyro.
  • Method Details

    • updateHighFreq

      public IMUState updateHighFreq(double timestampSec)
      Description copied from interface: GyroIO
      Polls high-frequency data for the 200Hz odometry loop.
      Specified by:
      updateHighFreq in interface GyroIO
      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

      public void updateInputs(GyroIO.GyroIOInputs inputs)
      Description copied from interface: GyroIO
      Updates the set of loggable inputs.
      Specified by:
      updateInputs in interface GyroIO
      Parameters:
      inputs - The inputs object to update.
    • clearFaults

      public void clearFaults()
      Description copied from interface: GyroIO
      Clears all faults and warnings.
      Specified by:
      clearFaults in interface GyroIO
    • setRotation

      public void setRotation(Rotation3d rotation)
      Description copied from interface: GyroIO
      Sets the gyro's rotation to the specified angle.
      Specified by:
      setRotation in interface GyroIO
      Parameters:
      rotation - The angle to set the gyro's rotation to.