diff --git a/README-RU.md b/README-RU.md index 00a5763..1bc65e8 100644 --- a/README-RU.md +++ b/README-RU.md @@ -50,6 +50,6 @@ ota_1, app, ota_1, , 1M - Параметры menuconfig - CONFIG_PARTITION_TABLE_CUSTOM=y - CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" - - CONFIG_WS_TRANSPORT=y + - CONFIG_HTTPD_WS_SUPPORT=y - CONFIG_APP_ROLLBACK_ENABLE=y diff --git a/README.md b/README.md index 017f0e1..542fa08 100644 --- a/README.md +++ b/README.md @@ -50,6 +50,6 @@ ota_1, app, ota_1, , 1M - menuconfig options - CONFIG_PARTITION_TABLE_CUSTOM=y - CONFIG_PARTITION_TABLE_CUSTOM_FILENAME="partitions.csv" - - CONFIG_WS_TRANSPORT=y + - CONFIG_HTTPD_WS_SUPPORT=y - CONFIG_APP_ROLLBACK_ENABLE=y diff --git a/source/ota_ws_update.html b/source/ota_ws_update.html index 1577fb2..099f706 100644 --- a/source/ota_ws_update.html +++ b/source/ota_ws_update.html @@ -151,11 +151,10 @@ socket.send(JSON.stringify({ name: "otaRestartEsp", value: "restart" })); }); - + /* // debug -> test sample function sleep(ms) { return new Promise(resolve => setTimeout(resolve, ms)); } - /* // debug -> test sample async function tstReceive() { receiveWsData(JSON.stringify({ name: "otaSetChunkSize", value: 1024 })); while (otaStartsegment + otaSetChunkSize <= otaData.length && otaStarted == 1) { @@ -247,15 +246,13 @@ socket.onopen = function () { console.log("connect ws"); }; - socket.onclose = async function (event) { + socket.onclose = function (event) { console.log("close ws - reload"); - await sleep(2000); - document.location.reload(); - //console.log("close ws"); + setTimeout(() => document.location.reload(), 2000); }; socket.onerror = function () { - //document.location.reload(); console.log("error ws"); + setTimeout(() => document.location.reload(), 2000); }; socket.onmessage = function (event) { receiveWsData(event.data);