From 76d5700822cd6b7ca63f0b75c3842dc2367de173 Mon Sep 17 00:00:00 2001 From: Mark Patterson <35724907+markpatterson27@users.noreply.github.com> Date: Thu, 25 Jul 2019 16:47:11 +0100 Subject: [PATCH 1/2] fix gas heater duration --- adafruit_bme680.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/adafruit_bme680.py b/adafruit_bme680.py index 6541c4d..974f131 100644 --- a/adafruit_bme680.py +++ b/adafruit_bme680.py @@ -47,7 +47,8 @@ _BME680_REG_CHIPID = const(0xD0) _BME680_BME680_COEFF_ADDR1 = const(0x89) _BME680_BME680_COEFF_ADDR2 = const(0xE1) -_BME680_BME680_RES_WAIT_0 = const(0x5A) +_BME680_BME680_RES_HEAT_0 = const(0x5A) +_BME680_BME680_GAS_WAIT_0 = const(0x64) _BME680_REG_SOFTRESET = const(0xE0) _BME680_REG_CTRL_GAS = const(0x71) @@ -105,7 +106,9 @@ def __init__(self, *, refresh_rate=10): self._read_calibration() # set up heater - self._write(_BME680_BME680_RES_WAIT_0, [0x73, 0x64, 0x65]) + self._write(_BME680_BME680_RES_HEAT_0, [0x73]) + self._write(_BME680_BME680_GAS_WAIT_0, [0x65]) + self.sea_level_pressure = 1013.25 """Pressure in hectoPascals at sea level. Used to calibrate ``altitude``.""" From 967e11c6a2c4981bdc8426eec2242d1fe65e1fbb Mon Sep 17 00:00:00 2001 From: Mark Patterson <35724907+markpatterson27@users.noreply.github.com> Date: Thu, 25 Jul 2019 23:06:39 +0100 Subject: [PATCH 2/2] pylint fix. removed spaces. --- adafruit_bme680.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/adafruit_bme680.py b/adafruit_bme680.py index 974f131..e9ae15e 100644 --- a/adafruit_bme680.py +++ b/adafruit_bme680.py @@ -108,7 +108,7 @@ def __init__(self, *, refresh_rate=10): # set up heater self._write(_BME680_BME680_RES_HEAT_0, [0x73]) self._write(_BME680_BME680_GAS_WAIT_0, [0x65]) - + self.sea_level_pressure = 1013.25 """Pressure in hectoPascals at sea level. Used to calibrate ``altitude``."""