pbio/uartdev: fix sync on city hub
The flush needs to be immediately before the read, otherwise the read buffer can contain garbage that was read while sending the baud rate. Also, the ACK usually comes in < 1 ms so we don't need to wait so long. This improves the chances of not missing data if the ACK doesn't come, e.g. on the BOOST Color Distance sensor. Fixes: https://github.com/pybricks/support/issues/747
Showing
Please register or sign in to comment