David Lechner 23db8f4d9b terminal: fix input handler loop getting stuck
When no hub is connected, the terminal input handler loop would get
stuck waiting for didWrite or didFailToWrite which would never come
because handleWriteUart in ble/sagas only runs when a hub is connected.

This is fixed by only dispatching a write action if a user program is
running on the hub. By using this state, it also fixes characters being
buffered before the user program starts, e.g.

- connect hub
- type into terminal - no echo
- start the repl
- previously typed characters are echoed after the repl prompt

Now, anything typed before the user program is just ignored.

Fixes: https://github.com/pybricks/support/issues/865
Also properly fixes https://github.com/pybricks/support/issues/303
2022-12-21 12:40:47 -06:00
2022-11-18 19:28:00 -06:00
2022-12-16 12:23:53 -06:00
2022-09-09 11:37:37 -05:00
2022-11-18 19:28:00 -06:00
2022-09-09 11:37:37 -05:00
2022-12-21 12:40:47 -06:00
2022-12-21 12:40:47 -06:00

CI test status codecov

pybricks-code

A Web App for programming LEGO® Powered Up smart hubs using Pybricks MicroPython.

Try it at https://code.pybricks.com or the latest updates https://beta.pybricks.com.

screenshot

Contributing

If you'd like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.

For more details, see the file CONTRIBUTING.md.


LEGO® is a trademark of the LEGO Group of companies which does not sponsor, authorize or endorse this project.
S
Description
Web IDE for Pybricks
https://code.pybricks.com/
Readme MIT
52 MiB
Languages
TypeScript 90%
JavaScript 7.6%
SCSS 2.1%
HTML 0.2%
Python 0.1%