stash
This commit is contained in:
parent
e2e3b249bf
commit
d96504d3eb
1 changed files with 4 additions and 4 deletions
|
@ -341,7 +341,7 @@
|
|||
sbox = document.getElementById('status_box');
|
||||
sbox.className = "label " + cls;
|
||||
sbox.innerHTML = text;
|
||||
console.info(text);
|
||||
//console.info(text);
|
||||
}
|
||||
|
||||
function startPolling() {
|
||||
|
@ -519,7 +519,7 @@
|
|||
var firmware_file;
|
||||
|
||||
function load_firmware(evt) {
|
||||
console.log("load_firmware", evt);
|
||||
//console.log("load_firmware", evt);
|
||||
|
||||
var file = evt.target.files[0];
|
||||
if (!file) {
|
||||
|
@ -533,7 +533,7 @@
|
|||
reader.readAsArrayBuffer(file)
|
||||
}
|
||||
|
||||
const chunk_size = 1024;
|
||||
const chunk_size = 512;
|
||||
|
||||
function transmit_firmware_chunk(buf, i) {
|
||||
return new Promise((resolve, reject) => {
|
||||
|
@ -559,7 +559,7 @@
|
|||
}, 2000);
|
||||
wsWrite(frame.buffer);
|
||||
//build packet: type, seq, len, hash, data
|
||||
console.log(i, (end - begin), crc32(slice), (100*end/buf.byteLength)+"%");
|
||||
console.log(i, (end - begin), crc32(slice), (100 * end / buf.byteLength) + "%");
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue