1
0
Fork 0
mirror of https://github.com/silenty4ng/k5web synced 2025-04-19 00:29:49 +00:00

clean eeprom 0xff

This commit is contained in:
Silent YANG 2024-06-09 10:08:23 +08:00
parent 2a41f59656
commit 73a6f8ea30

View file

@ -105,7 +105,7 @@ const checkEeprom = async () => {
const clearEEPROM = async () => {
if(appStore.connectState != true){alert(sessionStorage.getItem('noticeConnectK5')); return;};
const eepromSize = await check_eeprom(appStore.connectPort, appStore.configuration?.uart);
let rawEEPROM = new Uint8Array(0x80);
let rawEEPROM = new Uint8Array(0x80).fill(0xff);
for (let i = 0; i < eepromSize; i += 0x80) {
await eeprom_write(appStore.connectPort, i, rawEEPROM, 0x80, appStore.configuration?.uart);
state.status = state.status + "清空进度:" + (((i - 0) / eepromSize) * 100).toFixed(1) + "%<br/>";