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.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  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. AppCore();
  12. void setup();
  13. void loop();
  14. protected:
  15. void setState(UiStateEnum state);
  16. void checkBoilerItem(BoilerItemState* boilerItemState);
  17. void readAndUpdateSensors(BoilerItemState* boilerItemState, const uint8_t* sensor);
  18. void printState();
  19. void printStateLine(
  20. char prefix
  21. , const BoilerItemState* boilerItemState
  22. , bool isModifying
  23. , bool isActive
  24. );
  25. void tempToStr(
  26. char* out
  27. , temp_t temp
  28. , signed char width
  29. );
  30. private:
  31. AppCoreState* m_appCoreState;
  32. Storage m_storage;
  33. UiStateEnum m_modeSequence[3];
  34. Button* m_pBtnCancel;
  35. Button* m_pBtnOk;
  36. Button* m_pBtnMinus;
  37. Button* m_pBtnPlus;
  38. Button* m_pButtons[3];
  39. LiquidCrystal* m_pLcd;
  40. OneWire* m_pOneWire;
  41. DallasTemperature* m_pSensors;
  42. DeviceAddress m_sensor1;
  43. DeviceAddress m_sensor2;
  44. };