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

Handle disconnects when accessing memory #367

Merged
merged 3 commits into from
Dec 5, 2022

Conversation

krichardsson
Copy link
Contributor

This PR adds fixes to detect and handle radio disconnects while accessing the mapped memory.
If the Crazyflie is disconnected/turned off the failed callback will now be called to let the application know that the read/write failed. A future improvement could be to also add a reason for the failure.

Fixes #366

Copy link
Member

@ataffanel ataffanel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good addition, every call with a callback should contain a fail callback if the main callback is not guaranteed to be called in case of error (similar to promises in JS ...). Good to add one to the memory subsystem.

@krichardsson krichardsson merged commit 47d6086 into master Dec 5, 2022
@krichardsson krichardsson deleted the krichardsson/disconnect-handling branch December 5, 2022 13:20
@krichardsson krichardsson added this to the 0.1.21 milestone Dec 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sync classes do not handle lost connection in a good way
2 participants