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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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_btnMode;
  35. Button m_btnMinus;
  36. Button m_btnPlus;
  37. Button* m_buttons[3];
  38. LiquidCrystal m_lcd;
  39. OneWire m_oneWire;
  40. DallasTemperature m_sensors;
  41. DeviceAddress m_sensor1;
  42. DeviceAddress m_sensor2;
  43. };