12345678910111213141516171819202122232425262728293031323334353637383940414243 |
- #pragma once
-
- typedef short temp_t;
- #define TEMP_T_INVALID -127
- typedef unsigned long timestamp_t;
-
- enum UiStateEnum
- {
- Hibernate,
- Lighting,
- WaterSetting,
- HeaterSetting
- };
-
- struct BoilerItemState
- {
- temp_t current;
- temp_t setting;
- bool isActive;
- int pinNo;
- };
-
- struct AppState
- {
- timestamp_t lastSensorRequestMs;
- bool hasReadSensors;
- BoilerItemState water;
- BoilerItemState heater;
- };
-
- struct UiState
- {
- UiStateEnum state;
- timestamp_t lastOpMs;
- unsigned modeSequenceIndex;
- bool isUpdateNeeded;
- };
-
- struct AppCoreState
- {
- AppState appState;
- UiState uiState;
- };
|