-
Notifications
You must be signed in to change notification settings - Fork 3
Add typing, small refactoring #10
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
Merged
Merged
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
ca5f78f
Add typing for HTS221
tekktrik 3a71fb0
Refactor how CV and Rates values are initialized
tekktrik 2e20a70
Re-added "string" class attribute and usage
tekktrik 289cb41
Added missing "1" string value for Rate tuple
tekktrik c5eb147
Rename string class attribute to label
tekktrik 521dcf7
Add getting data rate label to example
tekktrik fd6b58c
Update adafruit_hts221.py
tekktrik 64633cf
Update adafruit_hts221.py
tekktrik c780253
Update adafruit_hts221.py
tekktrik File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Did these
None
s serve any purpose previously?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.
My understanding from other libraries that do this is the store the resolution or LSB. As an example, if an option changes the sensitivity of a sensor to the equivalent of 8 bits, this would be 0.0039. So it's just that it doesn't here because it changes rate, not anything where the value of a "unit" of it changes, if that makes sense.
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.
Did you run it with a device? Seems okay to me. But want to try to make sure it won't cause IndexError anywhere ifi we can. I don't have one of these sensors.
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.
I don't think I did, I don't think I own this sensor. The other libraries use it in calculations (calculating temperature using the LSB value and digital value, like from ADC) but it never seemed to be used in communication with the sensor. Happy to find a sensor and test with it if you'd like!
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.
Turns out the HTS221 is out of stock on Adafruit and Digi-Key with no restock date :/ depreciated maybe?