-
Notifications
You must be signed in to change notification settings - Fork 582
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
Fix bug where SHTC3 was not woken from sleep before operations #2034
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for looking at this. Can you as well update the example and wake up the sensor? And then also update the README?
src/devices/Shtc3/Shtc3.cs
Outdated
Write(Register.SHTC3_WAKEUP); | ||
|
||
_status = Status.Idle; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just remove this extra line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oops! Sorry about that. Updated now.
@Ellerbach, thanks for reviewing. Doesn't look like the sample nor README need change. What did you have in mind? The sample doesn't need to explicitly wake the sensor, because the call to Likewise, the sample isn't able to explicitly wake the sensor, because |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
As discussed in Discord.
SHTC3 binding would only ever read one set of values, before triggering this exception:
That's because the device was put to sleep (in the sample), but never actually woken up before getting the next reading. THAT was because the status was never set when device put to sleep.
Microsoft Reviewers: Open in CodeFlow