8 :
Humidistat(cs, hs, cs->HC_Kp, cs->HC_Ki, cs->HC_Kd, cs->HC_Kf, cs->dt, cs->S_lowValue, 1),
9 pins_solenoid{pins_solenoid[0], pins_solenoid[1]},
pwmRes(
pwmRes) {}
double cv
Control variable.
Base class for a humidistat. Holds a reference to a HumiditySensor instance.
void runCycle()
Run a cycle of the controller. Reads a sample from the humidity controller and runs PID.
void setGains(double Kp, double Ki, double Kd, double Kf, uint16_t dt)
Set the gains and timestep.
SingleHumidistat(HumiditySensor *hs, const ConfigStore *cs, etl::array< uint8_t, 2 > pins_solenoid, uint8_t pwmRes)
Constructor.
void updatePIDParameters()
const uint8_t pins_solenoid[2]
constexpr T ipow(T base, unsigned int pow)
Constexpr function for computing integer power.
Config store containing variables, which can be stored in EEPROM.
double HC_Kp
Humidity controller PID parameters.
double S_lowValue
Minimum solenoid duty cycle (deadband)
uint16_t dt
Global interval for PID/logger (based on polling rate of sensor, in millis)