Package com.thethriftybot.devices
Class ThriftyNova.PIDConfig
java.lang.Object
com.thethriftybot.devices.ThriftyNova.PIDConfig
- Enclosing class:
ThriftyNova
An internal PID controller configuration structure.
-
Method Summary
Modifier and TypeMethodDescriptionsetAccumulatorCap(double accumulatorCap) Sets the accumulator cap for the PID controller (IZone).setAllowableError(double allowableError) Sets the allowable error for the PID controller.setD(double d) Sets the derivative term for the PID controller.setFF(double ff) Sets the feed forward term for the PID controller.setI(double i) Sets the integral term for the PID controller.setIZone(double izone) Sets the accumulator cap for the PID controller (IZone).setP(double p) Sets the proportional term for the PID controller.setPID(PIDController pid) Set the PID controller terms from a PIDController object.
-
Method Details
-
setPID
Set the PID controller terms from a PIDController object.- Parameters:
pid- The PIDController object.- Returns:
- The PIDConfig object.
-
setP
Sets the proportional term for the PID controller.- Parameters:
p- The proportional term in rotations.- Returns:
- The PIDConfig object.
-
setI
Sets the integral term for the PID controller.- Parameters:
i- The integral term in revolutions.- Returns:
- The PIDConfig object.
-
setD
Sets the derivative term for the PID controller.- Parameters:
d- The derivative term in revolutions.- Returns:
- The PIDConfig object.
-
setFF
Sets the feed forward term for the PID controller.- Parameters:
ff- The feed forward term in revolutions.- Returns:
- The PIDConfig object.
-
setAllowableError
Sets the allowable error for the PID controller.- Parameters:
allowableError- The allowable error in revolutions.- Returns:
- The PIDConfig object.
-
setAccumulatorCap
Sets the accumulator cap for the PID controller (IZone).- Parameters:
accumulatorCap- The accumulator cap.- Returns:
- The PIDConfig object.
-
setIZone
Sets the accumulator cap for the PID controller (IZone).- Parameters:
izone- The accumulator cap.- Returns:
- The PIDConfig object.
-