12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- //
- // Created by robin on 1/27/20.
- //
-
- #ifndef HEATER_BOILER_H
- #define HEATER_BOILER_H
-
- typedef char temp_t;
- typedef unsigned long timestamp_t;
-
- enum UiStateEnum
- {
- Hibernate,
- Lighting,
- WaterSetting,
- HeaterSetting
- };
-
- struct BoilerItemState
- {
- temp_t current;
- temp_t setting;
- bool isActive;
- };
-
- struct AppState
- {
- BoilerItemState water;
- BoilerItemState heater;
- };
-
- struct UiState
- {
- UiStateEnum state;
- timestamp_t lastOpMs;
- unsigned modeSequenceIndex;
- bool isUpdateNeeded;
- };
-
- struct GlobalState
- {
- AppState appState;
- UiState uiState;
- };
-
- #endif //HEATER_BOILER_H
|