-
-
Notifications
You must be signed in to change notification settings - Fork 7
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] Remote light does not work well with async #1357
Comments
Thanks for reporting this. Writing values asynchronously remains a tricky issue on the Technic Hub. Maybe we should not make the remote hub light controllable with blocks to make this less of an issue. The button state can still be read without issues (which is probably the most important part of the remote). |
@mahil - does it work better if delete the remote light blocks (and keep the remote is pressed block)? |
Yes, it works. |
I believe it would be better to keep the lights for the remote control, but do not allow multitask instead (when you are using a remote controller). Otherwise, you cannot send any feedback to the user. My bug report was just an example that something is not working as expected. This example can run in a single task without any problems. |
Maybe same situation in #1373. |
We released a new beta version that fixes this. The following program used to crash within seconds, but now it works fine: You can try it out with the new firmware at https://beta.pybricks.com/ If you've used that page before, it may take a few minutes for the latest version to load in the background. If you go to settings/about, you'll see 3.4.0b1 as the new version: |
The source code with the fix will be published within a few weeks alongside a fun new feature. There were a few issues here. This was not related to async in the end. The data being written to the remote was not statically allocated, so it could be gone by the time it would send it to the remote. We've had this bug for a while, but it wasn't so noticeable without async which has a lot more going on in parallel. Thanks again for reporting! |
This has been fixed and the source has now been published, so we can close this issue. Main fix via pybricks/pybricks-micropython@8a47892 |
Originally posted by @mahil in #1281 (comment)
The text was updated successfully, but these errors were encountered: