1
0
Fork 0
mirror of https://github.com/silenty4ng/k5web synced 2025-04-10 02:29:31 +00:00
This commit is contained in:
Silent YANG 2025-02-02 00:37:25 +08:00
parent 69a14d6e32
commit 6f1eb7045b

View file

@ -420,8 +420,8 @@ const handleOk = async () => {
const restoreRange = async (start: any = 0, uint8Array: any) => {
await eeprom_init(appStore.connectPort);
for (let i = start; i < uint8Array.length + start; i += 0x32) {
await eeprom_write(appStore.connectPort, i, uint8Array.slice(i - start, i - start + 0x32), 0x32, appStore.configuration?.uart);
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);
state.status = state.status + "写入进度:" + (((i - start) / uint8Array.length) * 100).toFixed(1) + "%<br/>";
nextTick(() => {
const textarea = document?.getElementById('statusArea');