сценарии в вебе

This commit is contained in:
Dmitry Borisenko
2022-02-23 01:39:05 +01:00
parent 56a1c3fb0e
commit 23ae779b48
4 changed files with 20 additions and 15 deletions

View File

@@ -56,24 +56,29 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t* payload, size_t length)
jsonMergeObjects(json, paramsFlashJson);
standWebSocket.sendTXT(num, json);
}
//**сохранение**//
if (headerStr == "/tuoyal|") {
writeFileUint8tByFrames("layout.json", payload, length, headerLenth, 256);
}
// page configutation================================================================
//**отправка**//
if (headerStr == "/config|") {
sendFileToWs("/items.json", num, 1024);
sendFileToWs("/widgets.json", num, 1024);
sendFileToWs("/config.json", num, 1024);
sendFileToWs("/scenario.txt", num, 1024);
standWebSocket.sendTXT(num, settingsFlashJson);
}
//**сохранение**//
if (headerStr == "/gifnoc|") {
writeFileUint8tByFrames("config.json", payload, length, headerLenth, 256);
clearConfigure();
//clearConfigure();
configure("/config.json");
}
//**сохранение**//
if (headerStr == "/tuoyal|") {
writeFileUint8tByFrames("layout.json", payload, length, headerLenth, 256);
}
//**сохранение**//
if (headerStr == "/oiranecs|") {
writeFileUint8tByFrames("scenario.txt", payload, length, headerLenth, 256);
}
// page connection===================================================================
//**отправка**//
if (headerStr == "/connection|") {