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.
  • Constructor Details

  • Method Details

    • 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 interface PIDSource
      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: PIDSource
      Get which parameter of the device you are using as a process control variable.
      Specified by:
      getPIDSourceType in interface PIDSource
      Returns:
      the currently selected PID source parameter
    • pidGet

      public double pidGet()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Implement the PIDSource interface.
      Specified by:
      pidGet in interface PIDSource
      Returns:
      The current value of the selected source parameter.