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
ConstructorDescriptionPIDDefaults
(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 aPIDDefaults
record class. -
Method Summary
Modifier and TypeMethodDescriptiondouble
d()
Returns the value of thed
record component.double
Returns the value of thederivativeThreshold
record component.final boolean
Indicates whether some other object is "equal to" this one.double
Returns the value of theerrorThreshold
record component.double
f()
Returns the value of thef
record component.final int
hashCode()
Returns a hash code value for this object.double
i()
Returns the value of thei
record component.double
iZone()
Returns the value of theiZone
record component.double
Returns the value of themaxOutput
record component.double
Returns the value of theminOutput
record component.double
p()
Returns the value of thep
record component.double
Returns the value of thetimeThreshold
record component.final String
toString()
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 aPIDDefaults
record class.- Parameters:
p
- the value for thep
record componenti
- the value for thei
record componentd
- the value for thed
record componentf
- the value for thef
record componentmaxOutput
- the value for themaxOutput
record componentminOutput
- the value for theminOutput
record componenterrorThreshold
- the value for theerrorThreshold
record componentderivativeThreshold
- the value for thederivativeThreshold
record componenttimeThreshold
- the value for thetimeThreshold
record componentiZone
- the value for theiZone
record 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 thep
record component.- Returns:
- the value of the
p
record component
-
i
public double i()Returns the value of thei
record component.- Returns:
- the value of the
i
record component
-
d
public double d()Returns the value of thed
record component.- Returns:
- the value of the
d
record component
-
f
public double f()Returns the value of thef
record component.- Returns:
- the value of the
f
record component
-
maxOutput
public double maxOutput()Returns the value of themaxOutput
record component.- Returns:
- the value of the
maxOutput
record component
-
minOutput
public double minOutput()Returns the value of theminOutput
record component.- Returns:
- the value of the
minOutput
record component
-
errorThreshold
public double errorThreshold()Returns the value of theerrorThreshold
record component.- Returns:
- the value of the
errorThreshold
record component
-
derivativeThreshold
public double derivativeThreshold()Returns the value of thederivativeThreshold
record component.- Returns:
- the value of the
derivativeThreshold
record component
-
timeThreshold
public double timeThreshold()Returns the value of thetimeThreshold
record component.- Returns:
- the value of the
timeThreshold
record component
-
iZone
public double iZone()Returns the value of theiZone
record component.- Returns:
- the value of the
iZone
record component
-