PIDController
class PIDController(kP: () -> Double = { 0.005 }, kI: () -> Double = { 0.0 }, kD: () -> Double = { 0.0 }) : ControlLoop
This is a control class using proportional, integral, and derivative coefficients to calculate an optimal output.
Parameters
k P
the proportional coefficient
k I
the integral coefficient
k D
the derivative coefficient
Constructors
Functions
Link copied to clipboard
Initializes the control loop.
Link copied to clipboard
Checks if the motor is within a certain threshold of the target. Used when calculating if the motor should be running still. Checks the absolute value of the error (because it doesn't need to be calculating the direction the motor needs to move) against a threshold.