File tree 1 file changed +1
-5
lines changed
1 file changed +1
-5
lines changed Original file line number Diff line number Diff line change 1
1
import { useEffect , useRef , useState } from 'react'
2
2
import { qdlDevice } from '@commaai/qdl'
3
- import { concatUint8Array } from '@commaai/qdl/utils'
4
3
import * as Comlink from 'comlink'
5
4
6
5
import config from '../config'
@@ -243,9 +242,6 @@ export function useQdl() {
243
242
244
243
async function flashDevice ( ) {
245
244
const currentSlot = await qdl . current . getActiveSlot ( )
246
- if ( ! [ 'a' , 'b' ] . includes ( currentSlot ) ) {
247
- throw `Unknown current slot ${ currentSlot } `
248
- }
249
245
const otherSlot = currentSlot === 'a' ? 'b' : 'a'
250
246
251
247
// Erase current xbl partition so if users try to power up device
@@ -257,7 +253,7 @@ export function useQdl() {
257
253
const blob = await fileHandle . getFile ( )
258
254
259
255
setMessage ( `Flashing ${ image . name } ` )
260
- const partitionName = image . name + ` _${ otherSlot } `
256
+ const partitionName = ` ${ image . name } _${ otherSlot } `
261
257
await qdl . current . flashBlob ( partitionName , blob , onProgress )
262
258
}
263
259
console . debug ( '[QDL] Flashed all partitions' )
You can’t perform that action at this time.
0 commit comments