Speeduino
Loading...
Searching...
No Matches
Public Member Functions | List of all members
integerPID Class Reference

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

Constructor & Destructor Documentation

◆ integerPID()

integerPID::integerPID ( void  )

Default construction.

Here is the call graph for this function:

Member Function Documentation

◆ activate()

void integerPID::activate ( int32_t  input)

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ compute()

bool integerPID::compute ( uint32_t  nowMs,
int32_t  input,
int32_t pOutput 
)

Compute the new output.

Parameters
nowMsCurrent time in milliseconds
inputThe input value
pOutputA correction to be applied to the input; only valid when true is returned.
Returns
true if a calculation occurred, false otherwise
Here is the call graph for this function:
Here is the caller graph for this function:

◆ reset()

void integerPID::reset ( int32_t  input)

(Optional) Reset the controller

Here is the call graph for this function:
Here is the caller graph for this function:

◆ resetIntegeral()

void integerPID::resetIntegeral ( void  )

(Optional) Reset the integral term

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setFeedForwardTerm()

void integerPID::setFeedForwardTerm ( int32_t  feedForwardTerm)

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

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setOutputLimits()

void integerPID::setOutputLimits ( int32_t  min,
int32_t  max 
)

Set the output limits.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setSetPoint()

void integerPID::setSetPoint ( int32_t  setpoint)
inline

Set the controller set point.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ setTunings()

void integerPID::setTunings ( const PidTuningParameters pidParams,
uint32_t  nowMs,
uint16_t  minComputeInterval 
)

Set the PID tuning parameters.

Parameters
pidParamsP, I & D terms
nowMsCurrent time in milliseconds
minComputeIntervalMinimum time that should elapse between computations (in milliseconds)
Here is the call graph for this function:
Here is the caller graph for this function:

The documentation for this class was generated from the following files: