Skip to content

Commit

Permalink
clearer COMMA_RESET part label
Browse files Browse the repository at this point in the history
  • Loading branch information
incognitojam committed Jan 24, 2025
1 parent a273570 commit 57cc3de
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/utils/flash.js
Original file line number Diff line number Diff line change
Expand Up @@ -282,9 +282,9 @@ export function useQdl() {
setProgress(0)

async function resetUserdata() {
let wData = new TextEncoder().encode("COMMA_RESET")
wData = new Blob([concatUint8Array([wData, new Uint8Array(28 - wData.length).fill(0)])]) // make equal sparseHeaderSize
await qdl.current.flashBlob("userdata", wData)
const label = new Uint8Array(28).fill(0) // sparse header size
label.set(new TextEncoder().encode('COMMA_RESET'), 0)
await qdl.current.flashBlob('userdata', new Blob([label]))
}

async function eraseDevice() {
Expand Down

0 comments on commit 57cc3de

Please sign in to comment.