From 25f2375760b990c5f06f8b0ee4ce17df6bfc8839 Mon Sep 17 00:00:00 2001 From: Siwat Sirichai Date: Wed, 4 Sep 2019 23:03:00 +0700 Subject: [PATCH] no message --- WaterishOS-core3.0/WaterishOS-core3.0.ino | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/WaterishOS-core3.0/WaterishOS-core3.0.ino b/WaterishOS-core3.0/WaterishOS-core3.0.ino index 8b41725..4fad192 100644 --- a/WaterishOS-core3.0/WaterishOS-core3.0.ino +++ b/WaterishOS-core3.0/WaterishOS-core3.0.ino @@ -28,10 +28,11 @@ #include #include Adafruit_MCP23017 mcp; +using namespace ace_button; long tslr = 0; WiFiClient espClient; boolean allowbuttonint=true; -AceButton gpio0(0); +AceButton gpio(0); PubSubClient client("siwatsystem.com", 1883, espClient); PubSubClientTools mqtt(client); ThreadController threadControl = ThreadController(); @@ -49,7 +50,7 @@ int devconmenu=0; volatile boolean awakenByInterrupt = false; LiquidCrystal_I2C lcd(0x3F, 16, 2); int menu; -void handleGPIO0(AceButton*, uint8_t, uint8_t); +void handleGPIO(AceButton*, uint8_t, uint8_t); void writelcd(String line1, String line2){ if(!devcon){ lcd.clear(); @@ -181,7 +182,7 @@ void drawcon(){ writelcd("connectionchck.c","Check Connection"); } } -void handleGPIO0(AceButton* , uint8_t eventType, +void handleGPIO(AceButton* , uint8_t eventType, uint8_t ) { switch (eventType) { case AceButton::kEventPressed: @@ -200,7 +201,7 @@ void handleGPIO0(AceButton* , uint8_t eventType, delay(2000); writelcd("DEVCON TOOLKITS","set WTOS at 0x3D"); delay(1000); - allowbuttonint=true + allowbuttonint=true; devconmenu=1; drawcon(); break;