We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fc67c1b commit 41254b5Copy full SHA for 41254b5
pybricksdev/cli/oad.py
@@ -119,16 +119,19 @@ async def flash_oad_image(firmware: BinaryIO) -> None:
119
120
elif status == OADReturn.DL_COMPLETE:
121
break
122
+ elif status == OADReturn.CRC_ERR:
123
+ raise RuntimeError("Failed CRC check")
124
else:
- print(
125
+ raise RuntimeError(
126
f"Block {block_num} with unhandled status: {status.name}"
127
)
128
except BaseException:
129
await control_point.cancel_oad()
130
raise
131
- # This causes hub to reset and disconnect
- await control_point.enable_oad_image()
132
+ # This causes hub to reset and disconnect
133
+ await control_point.enable_oad_image()
134
+ print("Done.")
135
136
137
async def dump_oad_info():
0 commit comments