ota tested

This commit is contained in:
ok-home
2023-09-24 18:26:48 +07:00
parent 5c6932902e
commit 8cd46cf21d
6 changed files with 115 additions and 52 deletions

View File

@@ -171,7 +171,7 @@
function receiveWsData(data) {
try {
let obj = JSON.parse(data);
console.log(data);
//console.log(data);
switch (obj.name) {
case "otaSetChunkSize":
otaSetChunkSize = obj.value;
@@ -180,7 +180,7 @@
let otaDataSend = otaData.subarray(obj.value, obj.value + otaSetChunkSize);
document.getElementById("otaPogress").value = obj.value;
document.getElementById("otaStartCancel").innerHTML = "Ota Transfer. Size = " + otaData.length + " Segment = " + obj.value + " Click to Cancel";
console.log("sock send " + obj.value + " " + otaDataSend.length);
//console.log("sock send " + obj.value + " " + otaDataSend.length);
socket.send(otaDataSend);
break;
case "otaEnd":