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

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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. int pinNo;
  18. };
  19. struct AppState
  20. {
  21. timestamp_t lastSensorRequestMs;
  22. bool hasReadSensors;
  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 AppCoreState
  34. {
  35. AppState appState;
  36. UiState uiState;
  37. };