Fixed bugs.

Began to implement Fan Control.
This commit is contained in:
hg
2014-06-18 01:41:12 +02:00
parent 3992e5f7d0
commit 6c5ea5a39f
23 changed files with 862 additions and 46 deletions
+6 -2
View File
@@ -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();