Skip to content

Commit b6c1e9d

Browse files
author
gemi254
committed
Updated v1.0.4
1 parent 365723c commit b6c1e9d

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

examples/ControlAssist-Minimal/ControlAssist-Minimal.ino

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ const char st_ssid[]="";
1818
const char st_pass[]="";
1919
unsigned long pingMillis = millis(); // Ping
2020

21-
2221
ControlAssist ctrl; //Control assist class
2322

2423
//Handle web server root request and send html to client
@@ -30,7 +29,8 @@ void setup() {
3029
Serial.begin(115200);
3130
Serial.print("\n\n\n\n");
3231
Serial.flush();
33-
LOG_I("Starting..\n");
32+
LOG_I("Starting..\n");
33+
3434
//Connect WIFI?
3535
if(strlen(st_ssid)>0){
3636
LOG_E("Connect Wifi to %s.\n", st_ssid);
@@ -71,6 +71,11 @@ void setup() {
7171
}
7272

7373
void loop() {
74-
ctrl.loop();
74+
#if not defined(ESP32)
75+
if(MDNS.isRunning()) MDNS.update(); //Handle MDNS
76+
#endif
77+
//Handler webserver clients
7578
server.handleClient();
79+
//Handle websockets
80+
ctrl.loop();
7681
}

0 commit comments

Comments
 (0)