Skip to content

Commit

Permalink
Simplify debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
tbnobody committed Sep 2, 2023
1 parent 9dec05d commit 4f85d52
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions src/WebApi_ws_live.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -205,13 +205,9 @@ void WebApiWsLiveClass::addTotalField(JsonObject& root, String name, float value
void WebApiWsLiveClass::onWebsocketEvent(AsyncWebSocket* server, AsyncWebSocketClient* client, AwsEventType type, void* arg, uint8_t* data, size_t len)
{
if (type == WS_EVT_CONNECT) {
char str[64];
snprintf(str, sizeof(str), "Websocket: [%s][%u] connect", server->url(), client->id());
MessageOutput.println(str);
MessageOutput.printf("Websocket: [%s][%u] connect\r\n", server->url(), client->id());
} else if (type == WS_EVT_DISCONNECT) {
char str[64];
snprintf(str, sizeof(str), "Websocket: [%s][%u] disconnect", server->url(), client->id());
MessageOutput.println(str);
MessageOutput.printf("Websocket: [%s][%u] disconnect\r\n", server->url(), client->id());
}
}

Expand Down

0 comments on commit 4f85d52

Please sign in to comment.