mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-14 10:35:11 +00:00
bump @pybricks/firmware to 5.0.0
This contains a breaking change where main.py is now optional so we have to handle that case.
This commit is contained in:
@@ -201,11 +201,17 @@ function* loadFirmware(
|
||||
const firmwareBase = yield* call(() => reader.readFirmwareBase());
|
||||
const metadata = yield* call(() => reader.readMetadata());
|
||||
|
||||
// if a user program was not given, then use main.py from the frimware.zip
|
||||
// if a user program was not given, then use main.py from the firmware.zip
|
||||
if (program === undefined) {
|
||||
program = yield* call(() => reader.readMainPy());
|
||||
}
|
||||
|
||||
// REVISIT: the firmware may eventually be changed to allow no main.py
|
||||
// for now, ensure there is a program even if it does nothing
|
||||
if (!program) {
|
||||
program = '';
|
||||
}
|
||||
|
||||
if (![5, 6].includes(metadata['mpy-abi-version'])) {
|
||||
yield* put(
|
||||
didFailToFinish(
|
||||
|
||||
Reference in New Issue
Block a user