-
Notifications
You must be signed in to change notification settings - Fork 44
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
Added sensor properties + example to reflect consistency changes #6
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 adding these! A couple changes before we check it in.
adafruit_sgp30.py
Outdated
self._co2eq = None # pylint: disable=invalid-name | ||
self._tvoc = None # pylint: disable=invalid-name | ||
self._baseline_tvoc = None # pylint: disable=invalid-name | ||
self._baseline_co2eq = None # pylint: disable=invalid-name |
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.
You don't need these because you always update them in the property getter.
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.
Ok!
adafruit_sgp30.py
Outdated
def tvoc(self): # pylint: disable=invalid-name | ||
"""Total Volatile Organic Compound in parts per billion.""" | ||
self._tvoc = self.iaq_measure()[1] | ||
return self._tvoc |
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 return self.iaq_measure()[1]
and similar below.
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.
Changed - thanks (will keep this in mind next time)!
adafruit_sgp30.py
Outdated
|
||
|
||
@property | ||
def tvoc(self): # pylint: disable=invalid-name |
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.
These look like valid names to me. Did you copy the lint part from somewhere else? I don't think they are needed.
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.
Yeah, I was copying that from the CCS811 library. I'll remove.
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.
Awesome! Thanks for adding these
Updating https://github.com/adafruit/Adafruit_CircuitPython_PCF8523 to 1.2.0 from 1.1.1: > Merge pull request adafruit/Adafruit_CircuitPython_PCF8523#7 from kattni/pypi > updated CoC Updating https://github.com/adafruit/Adafruit_CircuitPython_Pixie to 1.1.0 from 1.0.0: > Merge pull request adafruit/Adafruit_CircuitPython_Pixie#5 from kattni/pypi > Merge pull request adafruit/Adafruit_CircuitPython_Pixie#4 from kattni/documentation-setup > Merge pull request adafruit/Adafruit_CircuitPython_Pixie#3 from kattni/documentation-setup Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM69 to 1.2.0 from 1.1.3: > Merge pull request adafruit/Adafruit_CircuitPython_RFM69#9 from kattni/pypi Updating https://github.com/adafruit/Adafruit_CircuitPython_RFM9x to 1.1.0 from 1.0.3: > Merge pull request adafruit/Adafruit_CircuitPython_RFM9x#7 from kattni/pypi > updated CoC Updating https://github.com/adafruit/Adafruit_CircuitPython_RGB_Display to 3.1.0 from 3.0.3: > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#22 from kattni/pypi > updated CoC > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#18 from sommersoft/new_docs > Merge pull request adafruit/Adafruit_CircuitPython_RGB_Display#17 from sommersoft/new_docs Updating https://github.com/adafruit/Adafruit_CircuitPython_SD to 3.2.1 from 3.1.1: > Merge pull request adafruit/Adafruit_CircuitPython_SD#10 from kattni/pypi > updated CoC Updating https://github.com/adafruit/Adafruit_CircuitPython_SGP30 to 1.1.0 from 1.0.2: > Merge pull request adafruit/Adafruit_CircuitPython_SGP30#8 from kattni/pypi > updated CoC > Merge pull request adafruit/Adafruit_CircuitPython_SGP30#7 from adafruit/tannewt-patch-1 > Merge pull request adafruit/Adafruit_CircuitPython_SGP30#6 from brentru/sensor-prop > Merge pull request adafruit/Adafruit_CircuitPython_SGP30#5 from sommersoft/new_docs > Merge pull request adafruit/Adafruit_CircuitPython_SGP30#4 from sommersoft/new_docs Updating https://github.com/adafruit/Adafruit_CircuitPython_SH to 2.0.0 from 1.0.2: > Merge pull request adafruit/Adafruit_CircuitPython_SH#7 from kattni/driver-rename > Merge pull request adafruit/Adafruit_CircuitPython_SH#6 from kattni/pypi > updated CoC Updating https://github.com/adafruit/Adafruit_CircuitPython_SI4713 to 1.1.0 from 1.0.2: > Merge pull request adafruit/Adafruit_CircuitPython_SI4713#4 from kattni/pypi > updated CoC > Merge pull request adafruit/Adafruit_CircuitPython_SI4713#3 from jepler/import-struct Updating https://github.com/adafruit/Adafruit_CircuitPython_SI5351 to 1.1.0 from 1.0.2: > Merge pull request adafruit/Adafruit_CircuitPython_SI5351#2 from kattni/pypi > updated CoC Updating https://github.com/adafruit/Adafruit_CircuitPython_SI7021 to 3.1.0 from 3.0.2: > Merge pull request adafruit/Adafruit_CircuitPython_SI7021#9 from kattni/pypi > updated CoC > Merge pull request adafruit/Adafruit_CircuitPython_SI7021#8 from sommersoft/new_docs > Merge pull request adafruit/Adafruit_CircuitPython_SI7021#7 from sommersoft/new_docs Updating https://github.com/adafruit/Adafruit_CircuitPython_SSD1306 to 2.4.0 from 2.3.0: > Merge pull request adafruit/Adafruit_CircuitPython_SSD1306#11 from kattni/pypi > updated CoC Updating https://github.com/adafruit/Adafruit_CircuitPython_STMPE610 to 1.1.0 from 1.0.1: > Merge pull request adafruit/Adafruit_CircuitPython_STMPE610#6 from kattni/pypi Updating https://github.com/adafruit/Adafruit_CircuitPython_TCS34725 to 3.1.0 from 3.0.3: > Merge pull request adafruit/Adafruit_CircuitPython_TCS34725#6 from kattni/pypi > updated CoC > Merge pull request adafruit/Adafruit_CircuitPython_TCS34725#5 from dherrada/master > Merge pull request adafruit/Adafruit_CircuitPython_TCS34725#3 from sommersoft/new_docs Updating https://github.com/adafruit/Adafruit_CircuitPython_Thermal_Printer to 1.1.0 from 1.0.1: > Merge pull request adafruit/Adafruit_CircuitPython_Thermal_Printer#4 from kattni/pypi > updated CoC > Merge pull request adafruit/Adafruit_CircuitPython_Thermal_Printer#3 from sommersoft/new_docs Updating https://github.com/adafruit/Adafruit_CircuitPython_BusDevice to 2.2.3 from 2.2.2: > Merge pull request adafruit/Adafruit_CircuitPython_BusDevice#18 from kattni/minor-fixes > updated CoC
fixes for issue adafruit/circuitpython#622 (comment) and
https://github.com/adafruit/Adafruit_CircuitPython_SGP30/issues