From 4ae50e2f2c90f40e64f6178a6ac66a34d8cd0393 Mon Sep 17 00:00:00 2001 From: Phil Howard Date: Fri, 1 Jun 2018 16:10:08 +0100 Subject: [PATCH] Fixed bug in set_temp_offset --- library/bme680/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/bme680/__init__.py b/library/bme680/__init__.py index 809128f..64d9f16 100644 --- a/library/bme680/__init__.py +++ b/library/bme680/__init__.py @@ -64,7 +64,7 @@ class BME680(BME680Data): """ if value == 0: self.offset_temp_in_t_fine = 0 - elif value < 0: + else: self.offset_temp_in_t_fine = int(math.copysign((((int(abs(value) * 100)) << 8) - 128) / 5, value)) def set_humidity_oversample(self, value):