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

Refactor status handling in SHTC3 binding #2038

Merged
merged 2 commits into from
Feb 15, 2023
Merged

Conversation

jcoliz
Copy link
Contributor

@jcoliz jcoliz commented Feb 14, 2023

As discussed on Discord with @krwq

  • Reduce to a single _status field (use field instead of property, per feedback)
  • Only check current status in Wakeup/Sleep methods, where it's needed
  • Add an Unknown status enum value to describe the moments before we have explicitly set the status.

Of course, fully tested on physical hardware.

Microsoft Reviewers: Open in CodeFlow

* Reduce to a single Status property
* Only check current status in WakeUp/Sleep methods, where it's needed
* Add an "Unknown" status enum value to describe the moments before we have explictly set the status.
@ghost ghost added the area-device-bindings Device Bindings for audio, sensor, motor, and display hardware that can used with System.Device.Gpio label Feb 14, 2023
@dnfadmin
Copy link

dnfadmin commented Feb 14, 2023

CLA assistant check
All CLA requirements met.

Copy link
Member

@Ellerbach Ellerbach left a comment

Choose a reason for hiding this comment

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

Looks god to me. Thanks for the fix

@Ellerbach Ellerbach merged commit 74be13e into dotnet:main Feb 15, 2023
@github-actions github-actions bot locked and limited conversation to collaborators Dec 8, 2023
This pull request was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-device-bindings Device Bindings for audio, sensor, motor, and display hardware that can used with System.Device.Gpio
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants