This commit is contained in:
e2002
2022-08-01 12:47:56 +03:00
parent f123c71d04
commit b3e110eae3
22 changed files with 1123 additions and 71 deletions

View File

@@ -380,7 +380,7 @@ void handleUpload(AsyncWebServerRequest *request, String filename, size_t index,
void onWsEvent(AsyncWebSocket *server, AsyncWebSocketClient *client, AwsEventType type, void *arg, uint8_t *data, size_t len) {
switch (type) {
case WS_EVT_CONNECT:
Serial.printf("WebSocket client #%u connected from %s\n", client->id(), client->remoteIP().toString().c_str());
if(config.store.audioinfo) Serial.printf("WebSocket client #%u connected from %s\n", client->id(), client->remoteIP().toString().c_str());
netserver.requestOnChange(STATION, client->id());
netserver.requestOnChange(TITLE, client->id());
@@ -393,7 +393,7 @@ void onWsEvent(AsyncWebSocket *server, AsyncWebSocketClient *client, AwsEventTyp
break;
case WS_EVT_DISCONNECT:
Serial.printf("WebSocket client #%u disconnected\n", client->id());
if(config.store.audioinfo) Serial.printf("WebSocket client #%u disconnected\n", client->id());
break;
case WS_EVT_DATA:
netserver.onWsMessage(arg, data, len);