Class PIDEncoder
java.lang.Object
edu.wpi.first.wpilibj.Encoder
edu.wpi.first.wpilibj.pidwrappers.PIDEncoder
- All Implemented Interfaces:
Sendable,CounterBase,PIDSource,AutoCloseable
@Deprecated(since="2022", forRemoval=true) public class PIDEncoder extends Encoder implements PIDSource
Deprecated, for removal: This API element is subject to removal in a future version.
Use
PIDController which doesn't require this
wrapper.Wrapper so that PIDSource is implemented for Encoder for old PIDController.
-
Nested Class Summary
Nested classes/interfaces inherited from interface edu.wpi.first.wpilibj.CounterBase
CounterBase.EncodingType -
Field Summary
-
Constructor Summary
Constructors Constructor Description PIDEncoder(int channelA, int channelB)Deprecated, for removal: This API element is subject to removal in a future version.PIDEncoder(int channelA, int channelB, boolean reverseDirection)Deprecated, for removal: This API element is subject to removal in a future version.PIDEncoder(int channelA, int channelB, boolean reverseDirection, CounterBase.EncodingType encodingType)Deprecated, for removal: This API element is subject to removal in a future version.PIDEncoder(int channelA, int channelB, int indexChannel)Deprecated, for removal: This API element is subject to removal in a future version.PIDEncoder(int channelA, int channelB, int indexChannel, boolean reverseDirection)Deprecated, for removal: This API element is subject to removal in a future version.PIDEncoder(DigitalSource sourceA, DigitalSource sourceB)Deprecated, for removal: This API element is subject to removal in a future version.PIDEncoder(DigitalSource sourceA, DigitalSource sourceB, boolean reverseDirection)Deprecated, for removal: This API element is subject to removal in a future version.PIDEncoder(DigitalSource sourceA, DigitalSource sourceB, boolean reverseDirection, CounterBase.EncodingType encodingType)Deprecated, for removal: This API element is subject to removal in a future version.PIDEncoder(DigitalSource sourceA, DigitalSource sourceB, DigitalSource indexSource)Deprecated, for removal: This API element is subject to removal in a future version.PIDEncoder(DigitalSource sourceA, DigitalSource sourceB, DigitalSource indexSource, boolean reverseDirection)Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and Type Method Description PIDSourceTypegetPIDSourceType()Deprecated, for removal: This API element is subject to removal in a future version.Get which parameter of the device you are using as a process control variable.doublepidGet()Deprecated, for removal: This API element is subject to removal in a future version.Implement the PIDSource interface.voidsetPIDSourceType(PIDSourceType pidSource)Deprecated, for removal: This API element is subject to removal in a future version.Set which parameter of the encoder you are using as a process control variable.Methods inherited from class edu.wpi.first.wpilibj.Encoder
close, get, getDecodingScaleFactor, getDirection, getDistance, getDistancePerPulse, getEncodingScale, getFPGAIndex, getPeriod, getRate, getRaw, getSamplesToAverage, getStopped, initSendable, reset, setDistancePerPulse, setIndexSource, setIndexSource, setIndexSource, setIndexSource, setMaxPeriod, setMinRate, setReverseDirection, setSamplesToAverage, setSimDevice
-
Constructor Details
-
PIDEncoder
Deprecated, for removal: This API element is subject to removal in a future version. -
PIDEncoder
Deprecated, for removal: This API element is subject to removal in a future version. -
PIDEncoder
public PIDEncoder(int channelA, int channelB, boolean reverseDirection, CounterBase.EncodingType encodingType)Deprecated, for removal: This API element is subject to removal in a future version. -
PIDEncoder
Deprecated, for removal: This API element is subject to removal in a future version. -
PIDEncoder
Deprecated, for removal: This API element is subject to removal in a future version. -
PIDEncoder
Deprecated, for removal: This API element is subject to removal in a future version. -
PIDEncoder
Deprecated, for removal: This API element is subject to removal in a future version. -
PIDEncoder
public PIDEncoder(DigitalSource sourceA, DigitalSource sourceB, boolean reverseDirection, CounterBase.EncodingType encodingType)Deprecated, for removal: This API element is subject to removal in a future version. -
PIDEncoder
public PIDEncoder(DigitalSource sourceA, DigitalSource sourceB, DigitalSource indexSource, boolean reverseDirection)Deprecated, for removal: This API element is subject to removal in a future version. -
PIDEncoder
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Details
-
setPIDSourceType
Deprecated, for removal: This API element is subject to removal in a future version.Set which parameter of the encoder you are using as a process control variable. The encoder class supports the rate and distance parameters.- Specified by:
setPIDSourceTypein interfacePIDSource- Parameters:
pidSource- An enum to select the parameter.
-
getPIDSourceType
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PIDSourceGet which parameter of the device you are using as a process control variable.- Specified by:
getPIDSourceTypein interfacePIDSource- Returns:
- the currently selected PID source parameter
-
pidGet
Deprecated, for removal: This API element is subject to removal in a future version.Implement the PIDSource interface.
-