PDController
This class controls a motor using proportional and derivative coefficients to calculate the power that the motor should be set to during any given time.
Parameters
k P
the proportional coefficient
k D
the derivative coefficient
Functions
Link copied to clipboard
Initializes the motor controller.
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.