1#ifndef HUMIDISTAT_CONTROLLER_H
2#define HUMIDISTAT_CONTROLLER_H
37 double cvMax,
double defaultSP,
double defaultCV);
43 void getTerms(
double &pTerm,
double &iTerm,
double &dTerm)
const;
Base class for a controller. Owns a PID instance, and holds a reference to a ConfigStore instance.
const ConfigStore * getConfigStore()
Get a pointer to the ConfigStore instance.
Controller(const ConfigStore *cs, double Kp, double Ki, double Kd, double Kf, uint16_t dt, double cvMin, double cvMax, double defaultSP, double defaultCV)
Constructor.
double pv
Process variable.
void update()
Run the controller: Typically reads a sensor, runs a cycle of the PID loop and drives some actuator.
double cv
Control variable.
void getTerms(double &pTerm, double &iTerm, double &dTerm) const
Get the three PID terms by reference.
void updatePIDParameters()
Update the PID parameters from the configStore.
unsigned long sensorLastRead
PID controller in parallel form implemented in floating-point arithmetic. Features Derivative-on-Meas...
Config store containing variables, which can be stored in EEPROM.