Skip to content

Commit 44237e0

Browse files
committed
firmware: Ignore EV3 error on GetVersion.
We don't use this datum for anything, and the rest of the flashing process apparently proceeds fine even if this fails. This could use further investigation, though.
1 parent 3fb56f8 commit 44237e0

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/firmware/sagas.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1221,12 +1221,19 @@ function* handleFlashEV3(action: ReturnType<typeof firmwareFlashEV3>): Generator
12211221

12221222
defined(version);
12231223

1224-
console.debug(
1225-
`EV3 bootloader version: ${version.getUint32(
1226-
0,
1227-
true,
1228-
)}, HW version: ${version.getUint32(4, true)}`,
1229-
);
1224+
// For reasons that we do not currently understand, some EV3s do not return
1225+
// anything to our GetVersion command. We don't actually use the version
1226+
// for anything so we will just ignore this error.
1227+
try {
1228+
console.debug(
1229+
`EV3 bootloader version: ${version.getUint32(
1230+
0,
1231+
true,
1232+
)}, HW version: ${version.getUint32(4, true)}`,
1233+
);
1234+
} catch (err) {
1235+
console.error(`Failed to parse ev3 version response: ${ensureError(err)}`);
1236+
}
12301237

12311238
// FIXME: should be called much earlier.
12321239
yield* put(didStart());

0 commit comments

Comments
 (0)