Package ca.team3161.lib.robot.pid
Class GyroAnglePIDSrc
- java.lang.Object
-
- ca.team3161.lib.robot.pid.GyroAnglePIDSrc
-
- All Implemented Interfaces:
PIDAngleValueSrc<edu.wpi.first.wpilibj.pidwrappers.PIDAnalogGyro>,PIDSrc<edu.wpi.first.wpilibj.pidwrappers.PIDAnalogGyro,java.lang.Float>,ComposedComponent<edu.wpi.first.wpilibj.interfaces.Gyro>,edu.wpi.first.wpilibj.PIDSource
public class GyroAnglePIDSrc extends java.lang.Object implements PIDSrc<edu.wpi.first.wpilibj.pidwrappers.PIDAnalogGyro,java.lang.Float>, PIDAngleValueSrc<edu.wpi.first.wpilibj.pidwrappers.PIDAnalogGyro>, ComposedComponent<edu.wpi.first.wpilibj.interfaces.Gyro>
A PID source backed by a physical Gyroscope. Defaults to returning gyroscope angle values.
-
-
Constructor Summary
Constructors Constructor Description GyroAnglePIDSrc(edu.wpi.first.wpilibj.pidwrappers.PIDAnalogGyro gyro)Create a new GyroAnglePIDSrc instance.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Collection<edu.wpi.first.wpilibj.interfaces.Gyro>getComposedComponents()Get the composed components within this one.java.lang.FloatgetMaxAngle()The maximal angle of this sensor.java.lang.FloatgetMinAngle()The minimal angle of this sensor.edu.wpi.first.wpilibj.PIDSourceTypegetPIDSourceType()java.lang.FloatgetPIDValue()Get the measured value of the sensor behind this PIDSrc.edu.wpi.first.wpilibj.pidwrappers.PIDAnalogGyrogetSensor()Get the sensor behind this PIDSrc.voidsetPIDSourceType(edu.wpi.first.wpilibj.PIDSourceType pidSourceType)-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface ca.team3161.lib.robot.pid.PIDAngleValueSrc
getAngle
-
-
-
-
Method Detail
-
getPIDValue
public java.lang.Float getPIDValue()
Get the measured value of the sensor behind this PIDSrc.- Specified by:
getPIDValuein interfacePIDSrc<edu.wpi.first.wpilibj.pidwrappers.PIDAnalogGyro,java.lang.Float>- Returns:
- the value.
-
getMinAngle
public java.lang.Float getMinAngle()
The minimal angle of this sensor.- Specified by:
getMinAnglein interfacePIDAngleValueSrc<edu.wpi.first.wpilibj.pidwrappers.PIDAnalogGyro>- Returns:
- the minimal angle of this sensor
-
getMaxAngle
public java.lang.Float getMaxAngle()
The maximal angle of this sensor.- Specified by:
getMaxAnglein interfacePIDAngleValueSrc<edu.wpi.first.wpilibj.pidwrappers.PIDAnalogGyro>- Returns:
- the maximal angle of this sensor
-
getSensor
public edu.wpi.first.wpilibj.pidwrappers.PIDAnalogGyro getSensor()
Get the sensor behind this PIDSrc.
-
getComposedComponents
public java.util.Collection<edu.wpi.first.wpilibj.interfaces.Gyro> getComposedComponents()
Get the composed components within this one.- Specified by:
getComposedComponentsin interfaceComposedComponent<edu.wpi.first.wpilibj.interfaces.Gyro>- Returns:
- the composed components.
-
setPIDSourceType
public void setPIDSourceType(edu.wpi.first.wpilibj.PIDSourceType pidSourceType)
- Specified by:
setPIDSourceTypein interfaceedu.wpi.first.wpilibj.PIDSource
-
getPIDSourceType
public edu.wpi.first.wpilibj.PIDSourceType getPIDSourceType()
- Specified by:
getPIDSourceTypein interfaceedu.wpi.first.wpilibj.PIDSource
-
-