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

only change sensor address if the device register updated #18

Merged
merged 1 commit into from
Sep 25, 2024

Conversation

devtanc
Copy link
Contributor

@devtanc devtanc commented Sep 16, 2024

I've had a few issues where writing to the device fails and the address is updated anyway. Not a great way to debug that, since the get_address function simply returns the locally saved address. This, however, allows you to check if the write was successful by comparing the local address and your desired address after the fact. There are other ways to check the success, but I feel like not updating the local address is more expected than updating it even if it fails.

@kevin-pololu kevin-pololu merged commit 669b4a9 into pololu:master Sep 25, 2024
1 check passed
@kevin-pololu
Copy link
Member

This seems like a good change. Thanks for your contribution.

@devtanc devtanc deleted the patch-1 branch September 26, 2024 03:46
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.

2 participants