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] Run buttons stay active on disconnect. #1021

Closed
laurensvalk opened this issue Apr 1, 2023 · 0 comments · Fixed by pybricks/pybricks-code#1651
Closed

[Bug] Run buttons stay active on disconnect. #1021

laurensvalk opened this issue Apr 1, 2023 · 0 comments · Fixed by pybricks/pybricks-code#1651
Assignees
Labels
bug Something isn't working OS: Linux Issues that only occur on Linux software: pybricks-code Issues with https://code.pybricks.com application

Comments

@laurensvalk
Copy link
Member

Describe the bug
Since there is a 5 second delay on disconnecting on Linux, it's easy to press the buttons because they are still active. This leads to error messages like the one below.

Related, but slightly different: It would be great if the buttons could disable immediately when the hub turns off as well, and start waiting 5 seconds after that.

To reproduce

update-2023-04-01_11.05.30.mp4

Expected behavior
Disable run buttons on disconnect, even if we wait 5 seconds after that.

@laurensvalk laurensvalk added bug Something isn't working OS: Linux Issues that only occur on Linux software: pybricks-code Issues with https://code.pybricks.com application labels Apr 1, 2023
dlech added a commit to pybricks/pybricks-code that referenced this issue Apr 1, 2023
When disconnect is requested, we should not longer allow interacting
with the hub, so we say the runtime state is unknown until it is
confirmed to be disconnected.

Fixes: pybricks/support#1021
dlech added a commit to pybricks/pybricks-code that referenced this issue Apr 1, 2023
If the user did not request disconnection, then we know this is a true
disconnect event and not an early one so we don't need the delay hack
in that case.

Issue: pybricks/support#600
Issue: pybricks/support#1021
@dlech dlech self-assigned this Apr 1, 2023
dlech added a commit to pybricks/pybricks-code that referenced this issue Apr 1, 2023
When disconnect is requested, we should not longer allow interacting
with the hub, so we say the runtime state is unknown until it is
confirmed to be disconnected.

Fixes: pybricks/support#1021
dlech added a commit to pybricks/pybricks-code that referenced this issue Apr 1, 2023
If the user did not request disconnection, then we know this is a true
disconnect event and not an early one so we don't need the delay hack
in that case.

Issue: pybricks/support#600
Issue: pybricks/support#1021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working OS: Linux Issues that only occur on Linux software: pybricks-code Issues with https://code.pybricks.com application
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants