Fixed bugs.
Began to implement Fan Control.
This commit is contained in:
@@ -17,6 +17,7 @@ using namespace tfcppsimple;
|
||||
|
||||
namespace growcontrol {
|
||||
|
||||
class GrowControl;
|
||||
struct GCSensorsInfo;
|
||||
|
||||
class LCD : public TfLCD20x4Listener, public TfDeviceStateListener {
|
||||
@@ -29,14 +30,15 @@ private:
|
||||
char lcdBuffer[4][21];
|
||||
bool lineFlags[4] = {false, false, false, false};
|
||||
int lcdLightCountdown = 0;
|
||||
int lcdLightMaxCountdown = 10;
|
||||
int lcdLightMaxCountdown = 30;
|
||||
bool lcdLightCountdownFlag = false;
|
||||
LCDPage* activePage = nullptr;
|
||||
|
||||
GrowControl& controller;
|
||||
MainPage pageRoot;
|
||||
|
||||
public:
|
||||
LCD();
|
||||
LCD(GrowControl& controller);
|
||||
virtual ~LCD();
|
||||
|
||||
void setTfObject(TfLCD20x4Bricklet& lcd);
|
||||
@@ -54,6 +56,8 @@ public:
|
||||
void resetLightCountdown();
|
||||
void setLight(bool light);
|
||||
|
||||
GrowControl& getGrowControl() { return controller; }
|
||||
|
||||
void controlMainLoopCallback(GCSensorsInfo& sensors);
|
||||
|
||||
bool isLCDConnected();
|
||||
|
||||
Reference in New Issue
Block a user