Humidistat
Arduino firmware for a humidistat (humidity controller)
Loading...
Searching...
No Matches
EEPROMConfig.h
Go to the documentation of this file.
1#ifndef HUMIDISTAT_EEPROMCONFIG_H
2#define HUMIDISTAT_EEPROMCONFIG_H
3
4#include CONFIG_HEADER
5
7struct ConfigStore {
8 char version[5];
10
11 uint16_t dt;
12
15 double HC_Kp;
16 double HC_Ki;
17 double HC_Kd;
18 double HC_Kf;
20
23 double FC_Kp;
24 double FC_Ki;
25 double FC_Kd;
26 double FC_Kf;
27 uint16_t FC_dt;
29
31 double S_lowValue;
32
35
37 double a;
38} const defaultConfigStore = {
39 "hum2",
40 false,
42
47
53
57};
58
61private:
63
64public:
66
69
72 bool load();
73
76 uint16_t save() const;
77
79 void reset();
80};
81
82
83#endif //HUMIDISTAT_EEPROMCONFIG_H
struct ConfigStore defaultConfigStore
Load/save an (internal) ConfigStore in EEPROM.
uint8_t address
void reset()
Reset the config store: overwrite the configStore with the default values.
uint16_t save() const
Saves current content of configStore into EEPROM.
bool load()
Load config values from EEPROM into configStore.
ConfigStore configStore
EEPROMConfig()
Constructor.
const uint8_t EEPROMAddress
EEPROM address for storing the block.
Definition config.h:39
const double FC_Kf
Definition config.h:61
const uint16_t dt
Global interval for PID/logger (based on polling rate of sensor, in millis)
Definition config.h:45
const double HC_Kf
Definition config.h:53
const uint16_t FC_dt
Definition config.h:62
const double HC_Kd
Definition config.h:52
const double HC_Ki
Definition config.h:51
const double HC_Kp
Definition config.h:50
const double FC_Kd
Definition config.h:60
const double HC_totalFlowrate
Total flowrate (for cascade controller) (L/min)
Definition config.h:69
const double S_lowValue
Minimum solenoid duty cycle (deadband)
Definition config.h:66
const double FC_Kp
Definition config.h:58
const double a
Smoothing factor of EMA filter for derivative.
Definition config.h:72
const double FC_Ki
Definition config.h:59
Config store containing variables, which can be stored in EEPROM.
Definition EEPROMConfig.h:7
uint16_t FC_dt
char version[5]
String identifying this block.
Definition EEPROMConfig.h:8
double HC_totalFlowrate
Total flowrate (for cascade controller) (L/min)
double a
Smoothing factor of EMA filter for derivative.
double HC_Kp
Humidity controller PID parameters.
bool loadedFromEEPROM
Whether this has been loaded from EEPROM.
Definition EEPROMConfig.h:9
double FC_Kp
Flow 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)