Class PIDAnalogGyro

java.lang.Object
edu.wpi.first.wpilibj.AnalogGyro
edu.wpi.first.wpilibj.pidwrappers.PIDAnalogGyro
All Implemented Interfaces:
Sendable, Gyro, PIDSource, AutoCloseable

@Deprecated(since="2022",
            forRemoval=true)
public class PIDAnalogGyro
extends AnalogGyro
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 AnalogGyro 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 gyro you are using as a process control variable. The Gyro class supports the rate and displacement 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.
      Get the output of the gyro for use with PIDControllers. May be the angle or rate depending on the set PIDSourceType
      Specified by:
      pidGet in interface PIDSource
      Returns:
      the output according to the gyro