From faa37ce915dd2bd447b607999f10270fb689bf24 Mon Sep 17 00:00:00 2001 From: Silent YANG <silenty4ng@gmail.com> Date: Wed, 10 Jul 2024 21:00:08 +0800 Subject: [PATCH] update --- src/views/guide/f117/index.vue | 2 +- src/views/list/card/index.vue | 2 +- src/views/list/chi/index.vue | 2 +- src/views/list/image/index.vue | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/views/guide/f117/index.vue b/src/views/guide/f117/index.vue index 7ccbc39..a26de78 100644 --- a/src/views/guide/f117/index.vue +++ b/src/views/guide/f117/index.vue @@ -213,7 +213,7 @@ const backupRange = async (start: any, end: any, name: any = new Date() + '_back const restoreRange = async (start: any = 0, uint8Array: any) => { await eeprom_init(appStore.connectPort); for (let i = start; i < uint8Array.length + start; i += 0x80) { - await eeprom_write(appStore.connectPort, i, uint8Array.slice(i - start, i - start + 0x80), 0x80, appStore.configuration?.uart); + await eeprom_write(appStore.connectPort, i, uint8Array.slice(i - start, i - start + 0x80), uint8Array.slice(i - start, i - start + 0x80).length, appStore.configuration?.uart); } await eeprom_reboot(appStore.connectPort); } diff --git a/src/views/list/card/index.vue b/src/views/list/card/index.vue index 278d306..1f08305 100644 --- a/src/views/list/card/index.vue +++ b/src/views/list/card/index.vue @@ -155,7 +155,7 @@ const restoreRange = async (start: any = 0) => { const blob = new Blob([input.files[0]], {type: 'application/octet-stream' }); const rawEEPROM = new Uint8Array(await blob.arrayBuffer()); for (let i = start; i < input.files[0].size + start; i += 0x80) { - await eeprom_write(appStore.connectPort, i, rawEEPROM.slice(i - start, i - start + 0x80), 0x80, appStore.configuration?.uart); + await eeprom_write(appStore.connectPort, i, rawEEPROM.slice(i - start, i - start + 0x80), rawEEPROM.slice(i - start, i - start + 0x80).length, appStore.configuration?.uart); state.status = state.status + "恢复进度:" + (((i - start) / input.files[0].size) * 100).toFixed(1) + "%<br/>"; nextTick(()=>{ const textarea = document?.getElementById('statusArea'); diff --git a/src/views/list/chi/index.vue b/src/views/list/chi/index.vue index 4841ef8..04dbf9b 100644 --- a/src/views/list/chi/index.vue +++ b/src/views/list/chi/index.vue @@ -65,7 +65,7 @@ const state = reactive({ const restoreRange = async (start: any = 0, uint8Array: any) => { await eeprom_init(appStore.connectPort); for (let i = start; i < uint8Array.length + start; i += 0x80) { - await eeprom_write(appStore.connectPort, i, uint8Array.slice(i - start, i - start + 0x80), 0x80, appStore.configuration?.uart); + await eeprom_write(appStore.connectPort, i, uint8Array.slice(i - start, i - start + 0x80), uint8Array.slice(i - start, i - start + 0x80).length, appStore.configuration?.uart); state.status = state.status + "写入进度:" + (((i - start) / uint8Array.length) * 100).toFixed(1) + "%<br/>"; nextTick(()=>{ const textarea = document?.getElementById('statusArea'); diff --git a/src/views/list/image/index.vue b/src/views/list/image/index.vue index de682ec..7a00fd0 100644 --- a/src/views/list/image/index.vue +++ b/src/views/list/image/index.vue @@ -208,7 +208,7 @@ const flashIt = async () => { await eeprom_init(appStore.connectPort); const rawEEPROM = state.binaryFile; for (let i = position; i < rawEEPROM.length + position; i += 0x80) { - await eeprom_write(appStore.connectPort, i, rawEEPROM.slice(i - position, i - position + 0x80), 0x80, appStore.configuration?.uart); + await eeprom_write(appStore.connectPort, i, rawEEPROM.slice(i - position, i - position + 0x80), rawEEPROM.slice(i - position, i - position + 0x80).length, appStore.configuration?.uart); } await eeprom_reboot(appStore.connectPort); state.loading = false