pimoroni / bme680-python

Python library for the BME680 gas, temperature, humidity and pressure sensor.
https://shop.pimoroni.com/products/bme680
MIT License
260 stars 93 forks source link

Support for low/high gas variants #40

Closed Gadgetoid closed 3 years ago

Gadgetoid commented 3 years ago

The BME688 is a "high" gas resistance variant of the BME680 and requires a slightly different init and gas compensation formula.

This change attempts to auto-detect the chip variant ID and do the right thing.

The constant ENABLE_GAS_MEAS is now set to -1 for back-compat, and passing this into set_gas_status will use the detected variant.

coveralls commented 3 years ago

Pull Request Test Coverage Report for Build 827858316


Files with Coverage Reduction New Missed Lines %
bme680/constants.py 1 99.61%
bme680/init.py 62 68.05%
<!-- Total: 63 -->
Totals Coverage Status
Change from base Build 827600312: -1.3%
Covered Lines: 421
Relevant Lines: 499

💛 - Coveralls