Package ca.team3161.lib.robot.pid
Interface PIDSrc<T extends edu.wpi.first.wpilibj.PIDSource,V extends java.lang.Number>
-
- Type Parameters:
T
- the type of sensor, eg Encoder or Gyro, used for this PID source.V
- the return type of this PID source.
- All Superinterfaces:
edu.wpi.first.wpilibj.PIDSource
- All Known Subinterfaces:
PIDAngleValueSrc<T>
,PIDRateValueSrc<T>
,PIDRawValueSrc<T>
- All Known Implementing Classes:
EncoderPIDSrc
,GyroAnglePIDSrc
,PotentiometerVoltagePIDSrc
,TractionController
,VelocityController
public interface PIDSrc<T extends edu.wpi.first.wpilibj.PIDSource,V extends java.lang.Number> extends edu.wpi.first.wpilibj.PIDSource
Interface for PID sources. On their own, these can only return back the sensor they represent. This interface is intended to be extended by interfaces which represent specific abilities of a type of sensor and thus of a type of PID source.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description V
getPIDValue()
Get the measured value of the sensor behind this PIDSrc.T
getSensor()
Get the sensor behind this PIDSrc.default double
pidGet()
Get the PID value measured by this sensor.
-
-
-
Method Detail
-
getSensor
T getSensor()
Get the sensor behind this PIDSrc.- Returns:
- the sensor.
-
getPIDValue
V getPIDValue()
Get the measured value of the sensor behind this PIDSrc.- Returns:
- the value.
-
pidGet
default double pidGet()
Get the PID value measured by this sensor.- Specified by:
pidGet
in interfaceedu.wpi.first.wpilibj.PIDSource
- Returns:
- the PID value.
-
-