Skip to content

Commit 61fddde

Browse files
authored
Merge pull request #18 from markpatterson27/upstream-issue-12
fix gas heater duration
2 parents e8bdf56 + 967e11c commit 61fddde

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

adafruit_bme680.py

+5-2
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,8 @@
6666
_BME680_REG_CHIPID = const(0xD0)
6767
_BME680_BME680_COEFF_ADDR1 = const(0x89)
6868
_BME680_BME680_COEFF_ADDR2 = const(0xE1)
69-
_BME680_BME680_RES_WAIT_0 = const(0x5A)
69+
_BME680_BME680_RES_HEAT_0 = const(0x5A)
70+
_BME680_BME680_GAS_WAIT_0 = const(0x64)
7071

7172
_BME680_REG_SOFTRESET = const(0xE0)
7273
_BME680_REG_CTRL_GAS = const(0x71)
@@ -124,7 +125,9 @@ def __init__(self, *, refresh_rate=10):
124125
self._read_calibration()
125126

126127
# set up heater
127-
self._write(_BME680_BME680_RES_WAIT_0, [0x73, 0x64, 0x65])
128+
self._write(_BME680_BME680_RES_HEAT_0, [0x73])
129+
self._write(_BME680_BME680_GAS_WAIT_0, [0x65])
130+
128131
self.sea_level_pressure = 1013.25
129132
"""Pressure in hectoPascals at sea level. Used to calibrate ``altitude``."""
130133

0 commit comments

Comments
 (0)