mirror of
https://github.com/cmur2/python-bme680.git
synced 2024-12-22 12:54:29 +01:00
Convert negative gas resistance readings to unsigned int32
This commit is contained in:
parent
288daed781
commit
888d8b312a
@ -354,6 +354,9 @@ class BME680(BME680Data):
|
||||
var3 = ((lookupTable2[gas_range] * var1) >> 9)
|
||||
calc_gas_res = ((var3 + (var2 >> 1)) / var2)
|
||||
|
||||
if calc_gas_res < 0:
|
||||
calc_gas_res = (1<<32) + calc_gas_res
|
||||
|
||||
return calc_gas_res
|
||||
|
||||
def _calc_heater_resistance(self, temperature):
|
||||
|
Loading…
Reference in New Issue
Block a user