Class ConfigurablePIDController

java.lang.Object
edu.wpi.first.math.controller.PIDController
me.nabdev.oxconfig.sampleClasses.ConfigurablePIDController
All Implemented Interfaces:
edu.wpi.first.util.sendable.Sendable, AutoCloseable, ConfigurableClass

public class ConfigurablePIDController extends edu.wpi.first.math.controller.PIDController implements ConfigurableClass
A WPILib PIDController that can be configured by OxConfig. This class is an example of implementing ConfigurableClass, but is safe for competition use.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ConfigurablePIDController(double kp, double ki, double kd, String key)
    Allocates a ConfigurablePIDController and registers it to OxConfig with the given constants for kp, ki, and kd and a default period of 0.02 seconds.
    ConfigurablePIDController(double kp, double ki, double kd, String key, String prettyName)
    Allocates a ConfigurablePIDController and registers it to OxConfig with the given constants for kp, ki, and kd and a default period of 0.02 seconds.
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the key of the configurable class (e.g.
    Gets the parameters of the configurable class
    Gets the pretty name of the configurable class (e.g.

    Methods inherited from class edu.wpi.first.math.controller.PIDController

    atSetpoint, calculate, calculate, close, disableContinuousInput, enableContinuousInput, getAccumulatedError, getD, getError, getErrorDerivative, getErrorDerivativeTolerance, getErrorTolerance, getI, getIZone, getP, getPeriod, getPositionError, getPositionTolerance, getSetpoint, getVelocityError, getVelocityTolerance, initSendable, isContinuousInputEnabled, reset, setD, setI, setIntegratorRange, setIZone, setP, setPID, setSetpoint, setTolerance, setTolerance

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • ConfigurablePIDController

      public ConfigurablePIDController(double kp, double ki, double kd, String key)
      Allocates a ConfigurablePIDController and registers it to OxConfig with the given constants for kp, ki, and kd and a default period of 0.02 seconds.
      Parameters:
      kp - The proportional coefficient.
      ki - The integral coefficient.
      kd - The derivative coefficient.
      key - The json key for the controller to be stored in
    • ConfigurablePIDController

      public ConfigurablePIDController(double kp, double ki, double kd, String key, String prettyName)
      Allocates a ConfigurablePIDController and registers it to OxConfig with the given constants for kp, ki, and kd and a default period of 0.02 seconds.
      Parameters:
      kp - The proportional coefficient.
      ki - The integral coefficient.
      kd - The derivative coefficient.
      key - The json key for the controller to be stored in
      prettyName - The display name of this controller
  • Method Details