mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 01:23:52 +00:00
wait for feedback more often during flashing
There have been some reports of firmware flashing not working with a checksum timeout error, meaning that we probably overflowed a buffer on the Bluetooth chip from sending data too fast. We don't have info of the Bluetooth firmware so we are just guessing here.
This commit is contained in:
committed by
David Lechner
parent
0944a27eb9
commit
9cfc7c5bd1
@@ -319,9 +319,11 @@ function* flashFirmware(action: FlashFirmwareFlashAction): Generator {
|
||||
yield put(progress(offset, firmware.length));
|
||||
|
||||
if (connectResult.canWriteWithoutResponse) {
|
||||
// request checksum every 25 packets to prevent buffer overrun on
|
||||
// the hub because of sending too much data at once
|
||||
if (++count % 25 === 0) {
|
||||
// Request checksum every 10 packets to prevent buffer overrun on
|
||||
// the hub because of sending too much data at once. The actual
|
||||
// number of packets that can be queued in the Bluetooth chip on
|
||||
// the hub is not known and could vary by device.
|
||||
if (++count % 10 === 0) {
|
||||
const checksumAction = (yield put(
|
||||
checksumRequest(),
|
||||
)) as BootloaderChecksumRequestAction;
|
||||
|
||||
Reference in New Issue
Block a user