Skip to content

Commit c18f3f8

Browse files
committed
Set maximum ambient pressure value to 1400mBar per updated datasheet
1 parent 7efc10b commit c18f3f8

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

adafruit_scd30.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ class SCD30:
8787

8888
def __init__(self, i2c_bus, ambient_pressure=0, address=SCD30_DEFAULT_ADDR):
8989
if ambient_pressure != 0:
90-
if ambient_pressure < 700 or ambient_pressure > 1200:
91-
raise AttributeError("`ambient_pressure` must be from 700-1200 mBar")
90+
if ambient_pressure < 700 or ambient_pressure > 1400:
91+
raise AttributeError("`ambient_pressure` must be from 700-1400 mBar")
9292

9393
self.i2c_device = i2c_device.I2CDevice(i2c_bus, address)
9494
self._buffer = bytearray(18)
@@ -158,14 +158,14 @@ def data_available(self):
158158
def ambient_pressure(self):
159159
"""Specifies the ambient air pressure at the measurement location in mBar. Setting this
160160
value adjusts the CO2 measurement calculations to account for the air pressure's effect on
161-
readings. Values must be in mBar, from 700 to 1200 mBar"""
161+
readings. Values must be in mBar, from 700 to 1400 mBar"""
162162
return self._read_register(_CMD_CONTINUOUS_MEASUREMENT)
163163

164164
@ambient_pressure.setter
165165
def ambient_pressure(self, pressure_mbar):
166166
pressure_mbar = int(pressure_mbar)
167-
if pressure_mbar != 0 and (pressure_mbar > 1200 or pressure_mbar < 700):
168-
raise AttributeError("ambient_pressure must be from 700 to 1200 mBar")
167+
if pressure_mbar != 0 and (pressure_mbar > 1400 or pressure_mbar < 700):
168+
raise AttributeError("ambient_pressure must be from 700 to 1400 mBar")
169169
self._send_command(_CMD_CONTINUOUS_MEASUREMENT, pressure_mbar)
170170

171171
@property

0 commit comments

Comments
 (0)