# 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.