Package com.thethriftybot.devices
Class ThriftyNova.ThriftyNovaConfig.PIDConfiguration
java.lang.Object
com.thethriftybot.devices.ThriftyNova.ThriftyNovaConfig.PIDConfiguration
- Enclosing class:
ThriftyNova.ThriftyNovaConfig
PID controller configuration structure.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionConstructs a default PIDConfiguration.PIDConfiguration(PIDController pid, Double p, Double i, Double d, Double f, Double iZone, Double allowableError) Constructs a PIDConfiguration with all parameters. -
Method Summary
Modifier and TypeMethodDescriptionsetPID(PIDController pid) Set the PID controller configuration from a PIDController object.
-
Field Details
-
pid
The PID controller object. -
p
Proportional gain. -
i
Integral gain. -
d
Derivative gain. -
f
Feed-forward gain. -
iZone
Integral zone. -
allowableError
Allowable error in rotations.
-
-
Constructor Details
-
PIDConfiguration
public PIDConfiguration()Constructs a default PIDConfiguration. -
PIDConfiguration
public PIDConfiguration(PIDController pid, Double p, Double i, Double d, Double f, Double iZone, Double allowableError) Constructs a PIDConfiguration with all parameters.- Parameters:
pid- The PID controller object.p- Proportional gain.i- Integral gain.d- Derivative gain.f- Feed-forward gain.iZone- Integral zone.allowableError- Allowable error in rotations.
-
-
Method Details
-
setPID
Set the PID controller configuration from a PIDController object.- Parameters:
pid- The PIDController object.- Returns:
- The PIDConfiguration object.
-