File tree Expand file tree Collapse file tree 1 file changed +8
-3
lines changed
examples/ControlAssist-Minimal Expand file tree Collapse file tree 1 file changed +8
-3
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,6 @@ const char st_ssid[]="";
18
18
const char st_pass[]=" " ;
19
19
unsigned long pingMillis = millis(); // Ping
20
20
21
-
22
21
ControlAssist ctrl; // Control assist class
23
22
24
23
// Handle web server root request and send html to client
@@ -30,7 +29,8 @@ void setup() {
30
29
Serial.begin (115200 );
31
30
Serial.print (" \n\n\n\n " );
32
31
Serial.flush ();
33
- LOG_I (" Starting..\n " );
32
+ LOG_I (" Starting..\n " );
33
+
34
34
// Connect WIFI?
35
35
if (strlen (st_ssid)>0 ){
36
36
LOG_E (" Connect Wifi to %s.\n " , st_ssid);
@@ -71,6 +71,11 @@ void setup() {
71
71
}
72
72
73
73
void loop () {
74
- ctrl.loop ();
74
+ #if not defined(ESP32)
75
+ if (MDNS.isRunning ()) MDNS.update (); // Handle MDNS
76
+ #endif
77
+ // Handler webserver clients
75
78
server.handleClient ();
79
+ // Handle websockets
80
+ ctrl.loop ();
76
81
}
You can’t perform that action at this time.
0 commit comments