Class ExpansionHubPidConstants

java.lang.Object
org.wpilib.hardware.expansionhub.ExpansionHubPidConstants

public class ExpansionHubPidConstants extends Object
This class contains PID constants for an ExpansionHub motor.
  • Method Details

    • setPID

      public void setPID(double p, double i, double d)
      Sets the PID Controller gain parameters.

      Set the proportional, integral, and differential coefficients.

      Parameters:
      p - The proportional coefficient.
      i - The integral coefficient.
      d - The derivative coefficient.
    • setFF

      public void setFF(double s, double v, double a)
      Sets the feed forward gains to the specified values.

      The units should be radians for angular systems and meters for linear systems.

      The PID control period is 10ms

      Parameters:
      s - The static gain in volts.
      v - The velocity gain in V/(units/s).
      a - The acceleration gain in V/(units/s²).
    • enableContinuousInput

      public void enableContinuousInput(double minimumInput, double maximumInput)
      Enables continuous input.

      Rather then using the max and min input range as constraints, it considers them to be the same point and automatically calculates the shortest route to the setpoint.

      Parameters:
      minimumInput - The minimum value expected from the input.
      maximumInput - The maximum value expected from the input.
    • disableContinuousInput

      public void disableContinuousInput()
      Disable continous input mode.