Package com.marswars.sensors.gyro
Class Gyro
java.lang.Object
com.marswars.sensors.gyro.Gyro
- All Implemented Interfaces:
SubsystemIoBase
- Direct Known Subclasses:
Pigeon2Gyro
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the logging key for this mechanismdoublebooleanvoidlogData()Log data to NetworkTables or other logging systemsabstract voidreadGyro()voidreadInputs(double timestamp) Read inputs from hardware or simulationvoidsetYaw(Rotation2d yaw) voidwriteOutputs(double timestamp) Write outputs to hardware or simulation
-
Field Details
-
IS_SIM
protected final boolean IS_SIM -
inputs_
protected final com.marswars.sensors.gyro.GyroInputsAutoLogged inputs_
-
-
Constructor Details
-
Gyro
-
-
Method Details
-
getLoggingKey
Get the logging key for this mechanism- Returns:
- the logging key
-
readInputs
public void readInputs(double timestamp) Description copied from interface:SubsystemIoBaseRead inputs from hardware or simulation- Specified by:
readInputsin interfaceSubsystemIoBase- Parameters:
timestamp- the current timestamp
-
readGyro
public abstract void readGyro() -
isConnected
public boolean isConnected() -
setYaw
-
getYawPosition
-
getPitchPosition
-
getRollPosition
-
getYawVelocityRadPerSec
public double getYawVelocityRadPerSec() -
logData
public void logData()Description copied from interface:SubsystemIoBaseLog data to NetworkTables or other logging systems- Specified by:
logDatain interfaceSubsystemIoBase
-
writeOutputs
public void writeOutputs(double timestamp) Description copied from interface:SubsystemIoBaseWrite outputs to hardware or simulation- Specified by:
writeOutputsin interfaceSubsystemIoBase- Parameters:
timestamp- the current timestamp
-