From d6e396bd7c2b6a6dcf2fa02445639a622a73c780 Mon Sep 17 00:00:00 2001 From: Dmitry Borisenko <49808844+DmitryBorisenko33@users.noreply.github.com> Date: Sun, 19 Dec 2021 21:18:50 +0100 Subject: [PATCH] ws --- src/WebSocket.cpp | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/WebSocket.cpp b/src/WebSocket.cpp index 79614e84..e25c6307 100644 --- a/src/WebSocket.cpp +++ b/src/WebSocket.cpp @@ -21,15 +21,9 @@ void wsSendSetup() { do { deserializeJson(doc, file); - // wsPublishData(F("config"), doc.as()); - // if (ws.enabled()) { - ws.textAll("[config]" + doc.as()); - //} - - // if (ws.enabled()) Serial.println("on"); + ws.textAll("[config]" + doc.as()); Serial.println(doc.as()); - } while (file.findUntil(",", "]")); SerialPrint("I", F("WS"), F("completed send config")); } @@ -38,3 +32,8 @@ void wsPublishData(String topic, String data) { data = "[" + topic + "]" + data; ws.textAll(data); } + +// wsPublishData(F("config"), doc.as()); +// if (ws.enabled()) { +//} +// if (ws.enabled()) Serial.println("on");