123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657 |
- #pragma once
-
- #include <LiquidCrystal.h>
- #include <JC_Button.h>
- #include <OneWire.h>
- #include <DallasTemperature.h>
- #include "Boiler.h"
- #include "Storage.h"
-
- class AppCore
- {
- public:
- static UiStateEnum s_menuSequence[4];
-
- AppCore();
-
- void setup();
-
- void loop();
-
- protected:
- void setState(UiStateEnum state);
-
- void checkBoilerItem(BoilerItemState* boilerItemState);
-
- void readAndUpdateSensors(BoilerItemState* boilerItemState, const uint8_t* sensor);
-
- void printState();
-
- void printStateLine(
- char prefix
- , const BoilerItemState* boilerItemState
- );
-
- void tempToStr(
- char* out
- , temp_t temp
- , signed char width
- );
-
- private:
- AppCoreState* m_appCoreState;
- Storage m_storage;
-
- Button* m_pBtnCancel;
- Button* m_pBtnOk;
- Button* m_pBtnMinus;
- Button* m_pBtnPlus;
- Button* m_pButtons[4];
-
- LiquidCrystal* m_pLcd;
-
- OneWire* m_pOneWire;
- DallasTemperature* m_pSensors;
- DeviceAddress m_sensor1;
- DeviceAddress m_sensor2;
- };
|