From 4f85d5286d91eb89469a8628a61bc3d6e156f1e3 Mon Sep 17 00:00:00 2001 From: Thomas Basler Date: Sat, 2 Sep 2023 02:14:08 +0200 Subject: [PATCH] Simplify debug output --- src/WebApi_ws_live.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/WebApi_ws_live.cpp b/src/WebApi_ws_live.cpp index 5ab468d8e..14859a4e4 100644 --- a/src/WebApi_ws_live.cpp +++ b/src/WebApi_ws_live.cpp @@ -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()); } }