You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Boiler.h 611B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #pragma once
  2. typedef short temp_t;
  3. #define TEMP_T_INVALID -127
  4. typedef unsigned long timestamp_t;
  5. enum UiStateEnum
  6. {
  7. Hibernate,
  8. Lighting,
  9. WaterSetting,
  10. HeaterSetting
  11. };
  12. struct BoilerItemState
  13. {
  14. temp_t current;
  15. temp_t setting;
  16. bool isActive;
  17. };
  18. struct AppState
  19. {
  20. timestamp_t lastSensorRequestMs;
  21. bool hasReadSensors;
  22. BoilerItemState water;
  23. BoilerItemState heater;
  24. };
  25. struct UiState
  26. {
  27. UiStateEnum state;
  28. timestamp_t lastOpMs;
  29. unsigned modeSequenceIndex;
  30. bool isUpdateNeeded;
  31. };
  32. struct AppCoreState
  33. {
  34. AppState appState;
  35. UiState uiState;
  36. };