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.UsePIDController
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 class edu.wpi.first.wpilibj.Encoder
Encoder.IndexingType
-
Nested classes/interfaces inherited from interface edu.wpi.first.wpilibj.CounterBase
CounterBase.EncodingType
-
-
Field Summary
-
Fields inherited from class edu.wpi.first.wpilibj.Encoder
m_aSource, m_bSource, m_indexSource
-
-
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
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description PIDSourceType
getPIDSourceType()
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.double
pidGet()
Deprecated, for removal: This API element is subject to removal in a future version.Implement the PIDSource interface.void
setPIDSourceType(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 Detail
-
PIDEncoder
public PIDEncoder(int channelA, int channelB, boolean reverseDirection)
Deprecated, for removal: This API element is subject to removal in a future version.
-
PIDEncoder
public PIDEncoder(int channelA, int channelB)
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
public PIDEncoder(int channelA, int channelB, int indexChannel, boolean reverseDirection)
Deprecated, for removal: This API element is subject to removal in a future version.
-
PIDEncoder
public PIDEncoder(int channelA, int channelB, int indexChannel)
Deprecated, for removal: This API element is subject to removal in a future version.
-
PIDEncoder
public PIDEncoder(DigitalSource sourceA, DigitalSource sourceB, boolean reverseDirection)
Deprecated, for removal: This API element is subject to removal in a future version.
-
PIDEncoder
public PIDEncoder(DigitalSource sourceA, DigitalSource sourceB)
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
public PIDEncoder(DigitalSource sourceA, DigitalSource sourceB, DigitalSource indexSource)
Deprecated, for removal: This API element is subject to removal in a future version.
-
-
Method Detail
-
setPIDSourceType
public void setPIDSourceType(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. The encoder class supports the rate and distance parameters.- Specified by:
setPIDSourceType
in interfacePIDSource
- Parameters:
pidSource
- An enum to select the parameter.
-
getPIDSourceType
public PIDSourceType getPIDSourceType()
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:PIDSource
Get which parameter of the device you are using as a process control variable.- Specified by:
getPIDSourceType
in interfacePIDSource
- Returns:
- the currently selected PID source parameter
-
-