![]() |
Speeduino
|
#include <integerPID.h>
Public Member Functions | |
| integerPID (void) | |
| Default construction. | |
| void | activate (int32_t input) |
| Activates the controller. Must be called before compute() will have any effect. | |
| bool | compute (uint32_t nowMs, int32_t input, int32_t *pOutput) |
| Compute the new output. | |
| void | reset (int32_t input) |
| (Optional) Reset the controller | |
| void | resetIntegeral (void) |
| (Optional) Reset the integral term | |
Configuration methods | |
| void | setOutputLimits (int32_t min, int32_t max) |
| Set the output limits. | |
| void | setSetPoint (int32_t setpoint) |
| Set the controller set point. | |
| void | setTunings (const PidTuningParameters &pidParams, uint32_t nowMs, uint16_t minComputeInterval) |
| Set the PID tuning parameters. | |
| void | setFeedForwardTerm (int32_t feedForwardTerm) |
| (Optional) Set the feed forward term (predictive bias) | |
| integerPID::integerPID | ( | void | ) |
Default construction.

Activates the controller. Must be called before compute() will have any effect.


Compute the new output.
| nowMs | Current time in milliseconds |
| input | The input value |
| pOutput | A correction to be applied to the input; only valid when true is returned. |


(Optional) Reset the controller


(Optional) Reset the integral term


(Optional) Set the feed forward term (predictive bias)


Set the output limits.


Set the controller set point.


| void integerPID::setTunings | ( | const PidTuningParameters & | pidParams, |
| uint32_t | nowMs, | ||
| uint16_t | minComputeInterval | ||
| ) |
Set the PID tuning parameters.
| pidParams | P, I & D terms |
| nowMs | Current time in milliseconds |
| minComputeInterval | Minimum time that should elapse between computations (in milliseconds) |

