Skip to content

Commit b62a473

Browse files
authored
Merge pull request #36 from vladak/celsius
fix Celsius spelling
2 parents 06e752c + 5352a4e commit b62a473

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

adafruit_sgp30.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -169,16 +169,16 @@ def set_iaq_humidity(self, gramsPM3): # pylint: disable=invalid-name
169169
buffer += arr
170170
self._run_profile(["iaq_set_humidity", [0x20, 0x61] + buffer, 0, 0.01])
171171

172-
def set_iaq_relative_humidity(self, celcius, relative_humidity):
172+
def set_iaq_relative_humidity(self, celsius, relative_humidity):
173173
"""
174174
Set the humidity in g/m3 for eCo2 and TVOC compensation algorithm.
175-
The absolute humidity is calculated from the temperature and relative
176-
humidity (as a percentage).
175+
The absolute humidity is calculated from the temperature (Celsius)
176+
and relative humidity (as a percentage).
177177
"""
178178
numerator = ((relative_humidity / 100) * 6.112) * exp(
179-
(17.62 * celcius) / (243.12 + celcius)
179+
(17.62 * celsius) / (243.12 + celsius)
180180
)
181-
denominator = 273.15 + celcius
181+
denominator = 273.15 + celsius
182182

183183
humidity_grams_pm3 = 216.7 * (numerator / denominator)
184184
self.set_iaq_humidity(humidity_grams_pm3)

0 commit comments

Comments
 (0)