no message
This commit is contained in:
parent
25f2375760
commit
94731c011c
|
@ -32,7 +32,6 @@ using namespace ace_button;
|
|||
long tslr = 0;
|
||||
WiFiClient espClient;
|
||||
boolean allowbuttonint=true;
|
||||
AceButton gpio(0);
|
||||
PubSubClient client("siwatsystem.com", 1883, espClient);
|
||||
PubSubClientTools mqtt(client);
|
||||
ThreadController threadControl = ThreadController();
|
||||
|
@ -50,7 +49,6 @@ int devconmenu=0;
|
|||
volatile boolean awakenByInterrupt = false;
|
||||
LiquidCrystal_I2C lcd(0x3F, 16, 2);
|
||||
int menu;
|
||||
void handleGPIO(AceButton*, uint8_t, uint8_t);
|
||||
void writelcd(String line1, String line2){
|
||||
if(!devcon){
|
||||
lcd.clear();
|
||||
|
@ -103,11 +101,6 @@ void setup() {
|
|||
delay(1000);
|
||||
WiFi.mode(WIFI_STA);
|
||||
WiFi.disconnect(true);
|
||||
esp_wifi_sta_wpa2_ent_set_identity((uint8_t *)eap_usernam, strlen(eap_username));
|
||||
esp_wifi_sta_wpa2_ent_set_username((uint8_t *)eap_username, strlen(eap_username));
|
||||
esp_wifi_sta_wpa2_ent_set_password((uint8_t *)eap_password, strlen(eap_password));
|
||||
esp_wpa2_config_t config = WPA2_CONFIG_INIT_DEFAULT();
|
||||
esp_wifi_sta_wpa2_ent_enable(&config);
|
||||
WiFi.begin(ssid);
|
||||
int connectionattempt = 0;
|
||||
while (WiFi.status() != WL_CONNECTED && online)
|
||||
|
@ -175,19 +168,14 @@ void setup() {
|
|||
void loop() {
|
||||
if(online)client.loop();
|
||||
if(!devcon)threadControl.run();
|
||||
if(allowbuttonint)gpio0.check();
|
||||
}
|
||||
void drawcon(){
|
||||
if(devconmenu==1){
|
||||
writelcd("connectionchck.c","Check Connection");
|
||||
}
|
||||
}
|
||||
void handleGPIO(AceButton* , uint8_t eventType,
|
||||
uint8_t ) {
|
||||
switch (eventType) {
|
||||
case AceButton::kEventPressed:
|
||||
if(devcon=false){
|
||||
allowbuttonint=false;
|
||||
void startdevcon(){
|
||||
allowbuttonint=false;
|
||||
devcon=true; //no going back, Delete Waterish OS and Install Siwat INC(R) DEVCON OS
|
||||
writelcd(" SIWAT INC(R) ","DEVCON OS V3.2.4");
|
||||
delay(1000);
|
||||
|
@ -204,11 +192,4 @@ void handleGPIO(AceButton* , uint8_t eventType,
|
|||
allowbuttonint=true;
|
||||
devconmenu=1;
|
||||
drawcon();
|
||||
break;
|
||||
}
|
||||
|
||||
case AceButton::kEventReleased:
|
||||
//debounce
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue