1
0
mirror of https://github.com/cmur2/python-bme680.git synced 2024-12-22 22:54:29 +01:00

Merge pull request #5 from gkluoe/master

Fix reassignment of variable in pressure calculation algo
This commit is contained in:
Philip Howard 2017-11-22 16:19:43 +00:00 committed by GitHub
commit c9d4cef987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -304,9 +304,9 @@ class BME680(BME680Data):
self.calibration_data.par_p6) >> 2
var2 = var2 + ((var1 * self.calibration_data.par_p5) << 1)
var2 = (var2 >> 2) + (self.calibration_data.par_p4 << 16)
var1 = ((var1 >> 2) * (var1 >> 2)) >> 13
var1 = ((var1 * (self.calibration_data.par_p3 << 5)) >> 3) + ((self.calibration_data.par_p2 * var1) >> 1)
var1 = (((((var1 >> 2) * (var1 >> 2)) >> 13 ) *
((self.calibration_data.par_p3 << 5)) >> 3) +
((self.calibration_data.par_p2 * var1) >> 1))
var1 = var1 >> 18
var1 = ((32768 + var1) * self.calibration_data.par_p1) >> 15