no message

This commit is contained in:
Siwat Sirichai 2019-09-04 23:03:00 +07:00
parent 1a58b81bc8
commit 25f2375760
1 changed files with 5 additions and 4 deletions

View File

@ -28,10 +28,11 @@
#include <ThreadController.h> #include <ThreadController.h>
#include <AceButton.h> #include <AceButton.h>
Adafruit_MCP23017 mcp; Adafruit_MCP23017 mcp;
using namespace ace_button;
long tslr = 0; long tslr = 0;
WiFiClient espClient; WiFiClient espClient;
boolean allowbuttonint=true; boolean allowbuttonint=true;
AceButton gpio0(0); AceButton gpio(0);
PubSubClient client("siwatsystem.com", 1883, espClient); PubSubClient client("siwatsystem.com", 1883, espClient);
PubSubClientTools mqtt(client); PubSubClientTools mqtt(client);
ThreadController threadControl = ThreadController(); ThreadController threadControl = ThreadController();
@ -49,7 +50,7 @@ int devconmenu=0;
volatile boolean awakenByInterrupt = false; volatile boolean awakenByInterrupt = false;
LiquidCrystal_I2C lcd(0x3F, 16, 2); LiquidCrystal_I2C lcd(0x3F, 16, 2);
int menu; int menu;
void handleGPIO0(AceButton*, uint8_t, uint8_t); void handleGPIO(AceButton*, uint8_t, uint8_t);
void writelcd(String line1, String line2){ void writelcd(String line1, String line2){
if(!devcon){ if(!devcon){
lcd.clear(); lcd.clear();
@ -181,7 +182,7 @@ void drawcon(){
writelcd("connectionchck.c","Check Connection"); writelcd("connectionchck.c","Check Connection");
} }
} }
void handleGPIO0(AceButton* , uint8_t eventType, void handleGPIO(AceButton* , uint8_t eventType,
uint8_t ) { uint8_t ) {
switch (eventType) { switch (eventType) {
case AceButton::kEventPressed: case AceButton::kEventPressed:
@ -200,7 +201,7 @@ void handleGPIO0(AceButton* , uint8_t eventType,
delay(2000); delay(2000);
writelcd("DEVCON TOOLKITS","set WTOS at 0x3D"); writelcd("DEVCON TOOLKITS","set WTOS at 0x3D");
delay(1000); delay(1000);
allowbuttonint=true allowbuttonint=true;
devconmenu=1; devconmenu=1;
drawcon(); drawcon();
break; break;