Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug] LWP3Device.read is blocking #1648

Open
laurensvalk opened this issue May 29, 2024 · 2 comments
Open

[Bug] LWP3Device.read is blocking #1648

laurensvalk opened this issue May 29, 2024 · 2 comments
Labels
bug Something isn't working software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: bluetooth Issues involving bluetooth

Comments

@laurensvalk
Copy link
Member

Describe the bug
LWP3Device.read() was not updated to be async.

For some reason I was thinking that it worked like reading the remote button state cache, so I never implemented async for this one. But it is a blocking call.

Expected behavior
Either not block (read latest) or be async.

Suggestions
If messages get lost anyway (they are overwritten), perhaps it can just be a non-blocking read like the buttons, instead of implementing async. Use case: reading the duplo train color. Just reading the latest value would suffice.

@laurensvalk laurensvalk added bug Something isn't working topic: bluetooth Issues involving bluetooth software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) labels May 29, 2024
@laurensvalk
Copy link
Member Author

@NStrijbosch
Copy link

Some details on the rationale for the read being blocking right now:

pybricks/pybricks-micropython#68 (review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working software: pybricks-micropython Issues with Pybricks MicroPython firmware (or EV3 runtime) topic: bluetooth Issues involving bluetooth
Projects
None yet
Development

No branches or pull requests

2 participants