обмен данными меджу флешь esp и веб страничкой

This commit is contained in:
Dmitry Borisenko
2021-12-25 01:52:25 +01:00
parent 11120a873f
commit 954192e5f9
3 changed files with 8 additions and 1 deletions

View File

@@ -214,6 +214,11 @@ void webSocketEvent(uint8_t num, WStype_t type, uint8_t* payload, size_t length)
if (myStreamJsonArray) myStreamJsonArray->sendFile("/config.json", num);
}
if (payloadStr.startsWith("/changed")) {
payloadStr.replace("/changed", "");
writeFile(F("config.json"), payloadStr);
}
// send message to client
// standWebSocket.sendTXT(num, "message here");