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

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