1
0
mirror of https://github.com/cmur2/python-bme680.git synced 2025-07-12 07:11:26 +02:00

4 Commits

Author SHA1 Message Date
da6ae97f1f Prep for v1.0.4 2017-12-04 10:37:52 +00:00
097287e842 Merge pull request #8 from lowflyerUK/master
Updated mask operation in constants.py to correct gas resistance
2017-12-04 10:28:14 +00:00
02407e1d01 Updated mask operation in constants.py to correct gas resistance 2017-12-03 21:49:32 +00:00
888d8b312a Convert negative gas resistance readings to unsigned int32 2017-12-01 14:08:40 +00:00
6 changed files with 26 additions and 3 deletions

View File

@ -1,3 +1,9 @@
1.0.4
-----
* Fix to range_sw_err for extremely high gas readings
* Convert to unsigned int to fix negative gas readings
1.0.3 1.0.3
----- -----

View File

@ -2,7 +2,7 @@ from .constants import *
import math import math
import time import time
__version__ = '1.0.3' __version__ = '1.0.4'
class BME680(BME680Data): class BME680(BME680Data):
"""BOSCH BME680 """BOSCH BME680
@ -354,6 +354,9 @@ class BME680(BME680Data):
var3 = ((lookupTable2[gas_range] * var1) >> 9) var3 = ((lookupTable2[gas_range] * var1) >> 9)
calc_gas_res = ((var3 + (var2 >> 1)) / var2) calc_gas_res = ((var3 + (var2 >> 1)) / var2)
if calc_gas_res < 0:
calc_gas_res = (1<<32) + calc_gas_res
return calc_gas_res return calc_gas_res
def _calc_heater_resistance(self, temperature): def _calc_heater_resistance(self, temperature):

View File

@ -325,7 +325,7 @@ class CalibrationData:
def set_other(self, heat_range, heat_value, sw_error): def set_other(self, heat_range, heat_value, sw_error):
self.res_heat_range = (heat_range & RHRANGE_MSK) // 16 self.res_heat_range = (heat_range & RHRANGE_MSK) // 16
self.res_heat_val = heat_value self.res_heat_val = heat_value
self.range_sw_err = (sw_error * RSERROR_MSK) // 16 self.range_sw_err = (sw_error & RSERROR_MSK) // 16
# BME680 sensor settings structure which comprises of ODR, # BME680 sensor settings structure which comprises of ODR,
# over-sampling and filter settings. # over-sampling and filter settings.

View File

@ -39,7 +39,7 @@ classifiers = ['Development Status :: 5 - Production/Stable',
setup( setup(
name = 'bme680', name = 'bme680',
version = '1.0.3', version = '1.0.4',
author = 'Philip Howard', author = 'Philip Howard',
author_email = 'phil@pimoroni.com', author_email = 'phil@pimoroni.com',
description = """Python library for driving the Pimoroni BME680 Breakout""", description = """Python library for driving the Pimoroni BME680 Breakout""",

View File

@ -1,3 +1,10 @@
bme680 (1.0.4) stable; urgency=low
* Fix to range_sw_err for extremely high gas readings
* Convert to unsigned int to fix negative gas readings
-- Phil Howard <phil@pimoroni.com> Mon, 04 Dec 2017 00:00:00 +0000
bme680 (1.0.3) stable; urgency=low bme680 (1.0.3) stable; urgency=low
* Merged temperature compensation fix from Bosch's BME680_driver 3.5.3 * Merged temperature compensation fix from Bosch's BME680_driver 3.5.3

View File

@ -1,3 +1,10 @@
bme680 (1.0.4) stable; urgency=low
* Fix to range_sw_err for extremely high gas readings
* Convert to unsigned int to fix negative gas readings
-- Phil Howard <phil@pimoroni.com> Mon, 04 Dec 2017 00:00:00 +0000
bme680 (1.0.3) stable; urgency=low bme680 (1.0.3) stable; urgency=low
* Merged temperature compensation fix from Bosch's BME680_driver 3.5.3 * Merged temperature compensation fix from Bosch's BME680_driver 3.5.3