Package xbot.common.math
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
ConstructorsConstructorDescriptionPIDDefaults(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 aPIDDefaultsrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubled()Returns the value of thedrecord component.doubleReturns the value of thederivativeThresholdrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of theerrorThresholdrecord component.doublef()Returns the value of thefrecord component.final inthashCode()Returns a hash code value for this object.doublei()Returns the value of theirecord component.doubleiZone()Returns the value of theiZonerecord component.doubleReturns the value of themaxOutputrecord component.doubleReturns the value of theminOutputrecord component.doublep()Returns the value of theprecord component.doubleReturns the value of thetimeThresholdrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aPIDDefaultsrecord class.- Parameters:
p- the value for theprecord componenti- the value for theirecord componentd- the value for thedrecord componentf- the value for thefrecord componentmaxOutput- the value for themaxOutputrecord componentminOutput- the value for theminOutputrecord componenterrorThreshold- the value for theerrorThresholdrecord componentderivativeThreshold- the value for thederivativeThresholdrecord componenttimeThreshold- the value for thetimeThresholdrecord componentiZone- the value for theiZonerecord component
-
-
Method Details
-
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. -
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. -
equals
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 '=='. -
p
public double p()Returns the value of theprecord component.- Returns:
- the value of the
precord component
-
i
public double i()Returns the value of theirecord component.- Returns:
- the value of the
irecord component
-
d
public double d()Returns the value of thedrecord component.- Returns:
- the value of the
drecord component
-
f
public double f()Returns the value of thefrecord component.- Returns:
- the value of the
frecord component
-
maxOutput
public double maxOutput()Returns the value of themaxOutputrecord component.- Returns:
- the value of the
maxOutputrecord component
-
minOutput
public double minOutput()Returns the value of theminOutputrecord component.- Returns:
- the value of the
minOutputrecord component
-
errorThreshold
public double errorThreshold()Returns the value of theerrorThresholdrecord component.- Returns:
- the value of the
errorThresholdrecord component
-
derivativeThreshold
public double derivativeThreshold()Returns the value of thederivativeThresholdrecord component.- Returns:
- the value of the
derivativeThresholdrecord component
-
timeThreshold
public double timeThreshold()Returns the value of thetimeThresholdrecord component.- Returns:
- the value of the
timeThresholdrecord component
-
iZone
public double iZone()Returns the value of theiZonerecord component.- Returns:
- the value of the
iZonerecord component
-