support icon indicating copy to clipboard operation
support copied to clipboard

[Bug] LWP3Device.read is blocking

Open laurensvalk opened this issue 1 year ago • 2 comments

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 avatar May 29 '24 09:05 laurensvalk

cc @NStrijbosch via https://github.com/orgs/pybricks/discussions/1372

laurensvalk avatar May 29 '24 09:05 laurensvalk

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

https://github.com/pybricks/pybricks-micropython/pull/68#pullrequestreview-736200675

NStrijbosch avatar May 29 '24 10:05 NStrijbosch