diff --git a/CHANGELOG.md b/CHANGELOG.md index 3d4df1227..ead41ae2a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -14,8 +14,10 @@ from `3.6.0b1` to `3.5.0` and back to `3.6.0b1` ([support#1846]). - Fixed controls stopping if `use_gyro` is called again with the same argument as already active ([support#1858]). +- Fixed lockup and reboot with f-strings in tight loops ([support#1668]). [support#1623]: https://github.com/pybricks/support/issues/1623 +[support#1668]: https://github.com/pybricks/support/issues/1668 [support#1846]: https://github.com/pybricks/support/issues/1846 [support#1858]: https://github.com/pybricks/support/issues/1858 diff --git a/bricks/_common_stm32/mphalport.c b/bricks/_common_stm32/mphalport.c index d2a2fc30c..19356583d 100644 --- a/bricks/_common_stm32/mphalport.c +++ b/bricks/_common_stm32/mphalport.c @@ -138,13 +138,13 @@ void mp_hal_stdout_tx_strn(const char *str, mp_uint_t len) { continue; } + MICROPY_EVENT_POLL_HOOK + if (err != PBIO_ERROR_AGAIN) { // Ignoring error for now. This means stdout lost if Bluetooth is // disconnected. return; } - - MICROPY_EVENT_POLL_HOOK } }