Skip to content

Commit b4d2c3f

Browse files
tici
1 parent eb9aea5 commit b4d2c3f

File tree

3 files changed

+21
-1
lines changed

3 files changed

+21
-1
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"node": ">=20.11.0"
1414
},
1515
"dependencies": {
16-
"@commaai/qdl": "git+https://github.com/commaai/qdl.js.git#52021f0b1ace58673ebca1fae740f6900ebff707",
16+
"@commaai/qdl": "git+https://github.com/maxime-desroches/qdl.js.git#1ae8eefbf61a2add8a6a617b15dd178ba10be77a",
1717
"@fontsource-variable/inter": "^5.2.5",
1818
"@fontsource-variable/jetbrains-mono": "^5.2.5",
1919
"react": "^18.3.1",

src/app/Flash.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,11 @@ const errors = {
9292
description: 'The connection to your device was lost. Unplug your device and try again.',
9393
icon: cable,
9494
},
95+
[ErrorCode.UNSUPPORTED_TICI]: {
96+
status: 'Unsupported device detected',
97+
description: "Visit https://github.com/commaai/hardware/tree/master/comma_three to reflash your comma three with the latest compatible firmware.",
98+
icon: deviceExclamation,
99+
},
95100
[ErrorCode.REPAIR_PARTITION_TABLES_FAILED]: {
96101
status: 'Repairing partition tables failed',
97102
description: 'Your device\'s partition tables could not be repaired. Try using a different cable, USB port, or ' +

src/utils/manager.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ export const ErrorCode = {
2626
ERASE_FAILED: 6,
2727
FLASH_SYSTEM_FAILED: 7,
2828
FINALIZING_FAILED: 8,
29+
UNSUPPORTED_TICI: 9,
2930
}
3031

3132
/**
@@ -233,6 +234,20 @@ export class FlashManager {
233234
console.info('[Flash] Connected')
234235
this.#setConnected(true)
235236

237+
try {
238+
const deviceType = await this.device.getDeviceType()
239+
if (deviceType == 32) {
240+
this.#setError(ErrorCode.UNSUPPORTED_TICI)
241+
this.#setConnected(false)
242+
return
243+
}
244+
} catch (err) {
245+
console.error('[Flash] Connection lost', err)
246+
this.#setError(ErrorCode.LOST_CONNECTION)
247+
this.#setConnected(false)
248+
return
249+
}
250+
236251
let storageInfo
237252
try {
238253
storageInfo = await this.device.getStorageInfo()

0 commit comments

Comments
 (0)