Record Class PIDDefaults

java.lang.Object
java.lang.Record
xbot.common.math.PIDDefaults

public record PIDDefaults(double p, double i, double d, double f, double maxOutput, double minOutput, double errorThreshold, double derivativeThreshold, double timeThreshold, double iZone) extends Record
This class is used to define the default values for a PID controller.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
    PIDDefaults(double p, double i, double d)
     
    PIDDefaults(double p, double i, double d, double maxOutput, double minOutput)
     
    PIDDefaults(double p, double i, double d, double f, double maxOutput, double minOutput)
     
    PIDDefaults(double p, double i, double d, double f, double maxOutput, double minOutput, double errorThreshold, double derivativeThreshold, double timeThreshold)
     
    PIDDefaults(double p, double i, double d, double f, double maxOutput, double minOutput, double errorThreshold, double derivativeThreshold, double timeThreshold, double iZone)
    Creates an instance of a PIDDefaults record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    double
    d()
    Returns the value of the d record component.
    double
    Returns the value of the derivativeThreshold record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    double
    Returns the value of the errorThreshold record component.
    double
    f()
    Returns the value of the f record component.
    final int
    Returns a hash code value for this object.
    double
    i()
    Returns the value of the i record component.
    double
    Returns the value of the iZone record component.
    double
    Returns the value of the maxOutput record component.
    double
    Returns the value of the minOutput record component.
    double
    p()
    Returns the value of the p record component.
    double
    Returns the value of the timeThreshold record component.
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • PIDDefaults

      public PIDDefaults(double p, double i, double d, double f, double maxOutput, double minOutput, double errorThreshold, double derivativeThreshold, double timeThreshold)
    • PIDDefaults

      public PIDDefaults(double p, double i, double d, double f, double maxOutput, double minOutput)
    • PIDDefaults

      public PIDDefaults(double p, double i, double d, double maxOutput, double minOutput)
    • PIDDefaults

      public PIDDefaults(double p, double i, double d)
    • PIDDefaults

      public PIDDefaults()
    • PIDDefaults

      public PIDDefaults(double p, double i, double d, double f, double maxOutput, double minOutput, double errorThreshold, double derivativeThreshold, double timeThreshold, double iZone)
      Creates an instance of a PIDDefaults record class.
      Parameters:
      p - the value for the p record component
      i - the value for the i record component
      d - the value for the d record component
      f - the value for the f record component
      maxOutput - the value for the maxOutput record component
      minOutput - the value for the minOutput record component
      errorThreshold - the value for the errorThreshold record component
      derivativeThreshold - the value for the derivativeThreshold record component
      timeThreshold - the value for the timeThreshold record component
      iZone - the value for the iZone record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • p

      public double p()
      Returns the value of the p record component.
      Returns:
      the value of the p record component
    • i

      public double i()
      Returns the value of the i record component.
      Returns:
      the value of the i record component
    • d

      public double d()
      Returns the value of the d record component.
      Returns:
      the value of the d record component
    • f

      public double f()
      Returns the value of the f record component.
      Returns:
      the value of the f record component
    • maxOutput

      public double maxOutput()
      Returns the value of the maxOutput record component.
      Returns:
      the value of the maxOutput record component
    • minOutput

      public double minOutput()
      Returns the value of the minOutput record component.
      Returns:
      the value of the minOutput record component
    • errorThreshold

      public double errorThreshold()
      Returns the value of the errorThreshold record component.
      Returns:
      the value of the errorThreshold record component
    • derivativeThreshold

      public double derivativeThreshold()
      Returns the value of the derivativeThreshold record component.
      Returns:
      the value of the derivativeThreshold record component
    • timeThreshold

      public double timeThreshold()
      Returns the value of the timeThreshold record component.
      Returns:
      the value of the timeThreshold record component
    • iZone

      public double iZone()
      Returns the value of the iZone record component.
      Returns:
      the value of the iZone record component