#include <otPID.h>
Public Types | |
| enum | Controls { DIRECT = 0, REVERSE = 1 } |
Public Member Functions | |
| otPID () | |
| void | begin (F32 *Input, F32 *Output, F32 *Setpoint, F32 Kp, F32 Ki, F32 Kd, int ControllerDirection, U32 tickCounts) |
| bool | compute (U32 tickCounts) |
| void | setOutputLimits (F32 minValue, F32 maxValue) |
| void | setTunings (F32 Kp, F32 Ki, F32 Kd) |
| void | setControllerDirection (int Direction) |
| void | setSampleTime (int NewSampleTime) |
| F32 | getKp () |
| F32 | getKi () |
| F32 | getKd () |
| int | getDirection () |
|
|
|
|
|
|
|
||||||||||||||||||||||||||||||||||||
|
Initialize the library, links the PID to the Input, Output, and Setpoint. Initial tuning parameters are also set here.
|
|
|
This, as they say, is where the magic happens.
|
|
|
Return the controller direction |
|
|
Return derevative coefficient |
|
|
Return integral coefficient |
|
|
Return proportional coefficient |
|
|
Sets the Direction, or "Action" of the controller.
|
|
||||||||||||
|
Clamps the output to a specific range. 0-255 by default, but it's likely the user will want to change this depending on the application
|
|
|
Sets the frequency, in Milliseconds, with which the PID calculation is performed. Default is 100.
|
|
||||||||||||||||
|
This function allows the controller's dynamic performance to be adjusted.
|