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 619B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. //
  2. // Created by robin on 1/27/20.
  3. //
  4. #ifndef HEATER_BOILER_H
  5. #define HEATER_BOILER_H
  6. typedef char temp_t;
  7. typedef unsigned long timestamp_t;
  8. enum UiStateEnum
  9. {
  10. Hibernate,
  11. Lighting,
  12. WaterSetting,
  13. HeaterSetting
  14. };
  15. struct BoilerItemState
  16. {
  17. temp_t current;
  18. temp_t setting;
  19. bool isActive;
  20. };
  21. struct AppState
  22. {
  23. BoilerItemState water;
  24. BoilerItemState heater;
  25. };
  26. struct UiState
  27. {
  28. UiStateEnum state;
  29. timestamp_t lastOpMs;
  30. unsigned modeSequenceIndex;
  31. bool isUpdateNeeded;
  32. };
  33. struct GlobalState
  34. {
  35. AppState appState;
  36. UiState uiState;
  37. };
  38. #endif //HEATER_BOILER_H