mirror of
https://github.com/cmur2/python-bme680.git
synced 2025-07-12 07:11:26 +02:00
Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
da6ae97f1f | |||
097287e842 | |||
02407e1d01 | |||
888d8b312a |
@ -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
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
@ -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):
|
||||||
|
@ -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.
|
||||||
|
@ -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""",
|
||||||
|
@ -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
|
||||||
|
@ -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
|
||||||
|
Reference in New Issue
Block a user