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.

AppCore.h 1.0KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  1. #pragma once
  2. #include <LiquidCrystal.h>
  3. #include <JC_Button.h>
  4. #include <OneWire.h>
  5. #include <DallasTemperature.h>
  6. #include "Boiler.h"
  7. #include "Storage.h"
  8. class AppCore
  9. {
  10. public:
  11. static UiStateEnum s_menuSequence[4];
  12. AppCore();
  13. void setup();
  14. void loop();
  15. protected:
  16. void setState(UiStateEnum state);
  17. void checkBoilerItem(BoilerItemState* boilerItemState);
  18. void readAndUpdateSensors(BoilerItemState* boilerItemState, const uint8_t* sensor);
  19. void printState();
  20. void printStateLine(
  21. char prefix
  22. , const BoilerItemState* boilerItemState
  23. );
  24. void tempToStr(
  25. char* out
  26. , temp_t temp
  27. , signed char width
  28. );
  29. private:
  30. AppCoreState* m_appCoreState;
  31. Storage m_storage;
  32. Button* m_pBtnCancel;
  33. Button* m_pBtnOk;
  34. Button* m_pBtnMinus;
  35. Button* m_pBtnPlus;
  36. Button* m_pButtons[4];
  37. LiquidCrystal* m_pLcd;
  38. OneWire* m_pOneWire;
  39. DallasTemperature* m_pSensors;
  40. DeviceAddress m_sensor1;
  41. DeviceAddress m_sensor2;
  42. };