Skip to content

revise lux calculation to accept 0 reading without error #11

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 2 commits into from
Dec 22, 2017
Merged

revise lux calculation to accept 0 reading without error #11

merged 2 commits into from
Dec 22, 2017

Conversation

jerryneedell
Copy link
Contributor

fixes lux calculation to accept a ratio of 0 (use >=0 instead of >0 ). Simplified if/elif tests to only test upper limit on each case. It is not necessary to test both lower and upper each time since it will only fall through if the value exceeds the lower limit.

@caternuson caternuson merged commit 43e7a87 into adafruit:master Dec 22, 2017
@caternuson
Copy link
Collaborator

crazy edge case. nice work!

tannewt pushed a commit to adafruit/Adafruit_CircuitPython_Bundle that referenced this pull request Dec 23, 2017
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