Class PID

java.lang.Object
frc.robot.helpers.PID

public final class PID extends Object
PID control constants container.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    final double
    Derivative gain.
    final double
    Integral gain.
    final double
    Proportional gain.
  • Constructor Summary

    Constructors
    Constructor
    Description
    PID(double p, double i, double d)
    Creates new PID constants.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    applyToConfig(com.revrobotics.spark.config.ClosedLoopConfig config)
    Applies the PID constants to a SparkMax configuration.

    Methods inherited from class java.lang.Object

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

    • p

      public final double p
      Proportional gain.
    • i

      public final double i
      Integral gain.
    • d

      public final double d
      Derivative gain.
  • Constructor Details

    • PID

      public PID(double p, double i, double d)
      Creates new PID constants.
      Parameters:
      p - Proportional gain
      i - Integral gain
      d - Derivative gain
  • Method Details

    • applyToConfig

      public void applyToConfig(com.revrobotics.spark.config.ClosedLoopConfig config)
      Applies the PID constants to a SparkMax configuration.
      Parameters:
      config - The SparkMax configuration to apply the constants to.