1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859 |
- #pragma once
-
- #include <LiquidCrystal.h>
- #include <JC_Button.h>
- #include <OneWire.h>
- #include <DallasTemperature.h>
- #include "Boiler.h"
- #include "Storage.h"
-
- class AppCore
- {
- public:
- 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
- , bool isModifying
- , bool isActive
- );
-
- void tempToStr(
- char* out
- , temp_t temp
- , signed char width
- );
-
- private:
- AppCoreState* m_appCoreState;
- Storage m_storage;
-
- UiStateEnum m_modeSequence[3];
-
- Button* m_pBtnCancel;
- Button* m_pBtnOk;
- Button* m_pBtnMinus;
- Button* m_pBtnPlus;
- Button* m_pButtons[3];
-
- LiquidCrystal* m_pLcd;
-
- OneWire* m_pOneWire;
- DallasTemperature* m_pSensors;
- DeviceAddress m_sensor1;
- DeviceAddress m_sensor2;
- };
|