From 26fd968782f13c45d343dda1d1e7b41f9778f36c Mon Sep 17 00:00:00 2001 From: biver Date: Thu, 28 Apr 2022 00:13:26 +0300 Subject: [PATCH] =?UTF-8?q?=D0=92=D0=BA=D0=BB=D1=8E=D1=87=D0=B0=D0=B5?= =?UTF-8?q?=D0=BC=20=D1=81=D0=BE=D1=85=D1=80=D0=B0=D0=BD=D0=B5=D0=BD=D0=B8?= =?UTF-8?q?=D0=B5=20=D0=BA=D0=BE=D0=BD=D1=84=D0=B8=D0=B3=D1=83=D1=80=D0=B0?= =?UTF-8?q?=D1=86=D0=B8=D0=B8=20=D0=B1=D0=B5=D0=B7=20=D0=BF=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D0=B7=D0=B0=D0=B3=D1=80=D1=83=D0=B7=D0=BA=D0=B8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/WsServer.cpp | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/WsServer.cpp b/src/WsServer.cpp index 818c15c0..0b3a2d7f 100644 --- a/src/WsServer.cpp +++ b/src/WsServer.cpp @@ -1,4 +1,7 @@ #include "WsServer.h" +#include "classes/IoTScenario.h" +extern IoTScenario iotScen; + #ifdef STANDARD_WEB_SOCKETS void standWebSocketsInit() { standWebSocket.begin(); @@ -66,8 +69,8 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t* payload, size_t length) //**сохранение**// if (headerStr == "/gifnoc|") { writeFileUint8tByFrames("config.json", payload, length, headerLenth, 256); - // clearConfigure(); - // configure("/config.json"); + clearConfigure(); + configure("/config.json"); } //**сохранение**// if (headerStr == "/tuoyal|") { @@ -76,6 +79,7 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t* payload, size_t length) //**сохранение**// if (headerStr == "/oiranecs|") { writeFileUint8tByFrames("scenario.txt", payload, length, headerLenth, 256); + iotScen.loadScenario("/scenario.txt"); } // page connection=================================================================== //**отправка**//