Class Gyro

java.lang.Object
com.marswars.sensors.gyro.Gyro
All Implemented Interfaces:
SubsystemIoBase
Direct Known Subclasses:
Pigeon2Gyro

public abstract class Gyro extends Object implements SubsystemIoBase
  • Field Details

    • IS_SIM

      protected final boolean IS_SIM
    • inputs_

      protected final com.marswars.sensors.gyro.GyroInputsAutoLogged inputs_
  • Constructor Details

    • Gyro

      public Gyro(String logging_prefix)
  • Method Details

    • getLoggingKey

      public String getLoggingKey()
      Get the logging key for this mechanism
      Returns:
      the logging key
    • readInputs

      public void readInputs(double timestamp)
      Description copied from interface: SubsystemIoBase
      Read inputs from hardware or simulation
      Specified by:
      readInputs in interface SubsystemIoBase
      Parameters:
      timestamp - the current timestamp
    • readGyro

      public abstract void readGyro()
    • isConnected

      public boolean isConnected()
    • setYaw

      public void setYaw(Rotation2d yaw)
    • getYawPosition

      public Rotation2d getYawPosition()
    • getPitchPosition

      public Rotation2d getPitchPosition()
    • getRollPosition

      public Rotation2d getRollPosition()
    • getYawVelocityRadPerSec

      public double getYawVelocityRadPerSec()
    • logData

      public void logData()
      Description copied from interface: SubsystemIoBase
      Log data to NetworkTables or other logging systems
      Specified by:
      logData in interface SubsystemIoBase
    • writeOutputs

      public void writeOutputs(double timestamp)
      Description copied from interface: SubsystemIoBase
      Write outputs to hardware or simulation
      Specified by:
      writeOutputs in interface SubsystemIoBase
      Parameters:
      timestamp - the current timestamp