From 8a5f330e2031923ae4b7638e44e81df4d0c2b70f Mon Sep 17 00:00:00 2001 From: dbroqua Date: Fri, 12 Feb 2021 16:33:40 +0100 Subject: [PATCH] Fixed bug on thermal sensor's reading --- sensors.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sensors.py b/sensors.py index ee05bae..e1d166a 100644 --- a/sensors.py +++ b/sensors.py @@ -66,7 +66,8 @@ class Sensors: # Convert volt to celcius value def convertToCelcius(self, value): - return ((3300.0/1024.0) - 100.0) / 10.0 - 40.0 + value /= 2 + return (value * (3300.0/1024.0) - 100.0) / 10.0 - 40.0 def convertToPrintableValue(self, value): if (self.getChannelType() == 'voltage'):