Skip to content

Commit fab6f8e

Browse files
committed
cleanup
1 parent 18a866c commit fab6f8e

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

src/utils/flash.js

+1-5
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
import { useEffect, useRef, useState } from 'react'
22
import { qdlDevice } from '@commaai/qdl'
3-
import { concatUint8Array } from '@commaai/qdl/utils'
43
import * as Comlink from 'comlink'
54

65
import config from '../config'
@@ -243,9 +242,6 @@ export function useQdl() {
243242

244243
async function flashDevice() {
245244
const currentSlot = await qdl.current.getActiveSlot()
246-
if (!['a', 'b'].includes(currentSlot)) {
247-
throw `Unknown current slot ${currentSlot}`
248-
}
249245
const otherSlot = currentSlot === 'a' ? 'b' : 'a'
250246

251247
// Erase current xbl partition so if users try to power up device
@@ -257,7 +253,7 @@ export function useQdl() {
257253
const blob = await fileHandle.getFile()
258254

259255
setMessage(`Flashing ${image.name}`)
260-
const partitionName = image.name + `_${otherSlot}`
256+
const partitionName = `${image.name}_${otherSlot}`
261257
await qdl.current.flashBlob(partitionName, blob, onProgress)
262258
}
263259
console.debug('[QDL] Flashed all partitions')

0 commit comments

Comments
 (0)