- refactored temperature correction
This commit is contained in:
@@ -39,7 +39,7 @@ class TempSensor_max31865(ATemperatureSensor):
|
||||
return self.digits
|
||||
|
||||
def temperature(self):
|
||||
return self.__tempRaw()
|
||||
return self.__tempRaw() + self.temp_correction
|
||||
|
||||
def __tempRaw(self):
|
||||
try:
|
||||
@@ -47,7 +47,7 @@ class TempSensor_max31865(ATemperatureSensor):
|
||||
except:
|
||||
return None
|
||||
R = TempSensor_max31865.calc_R(430, digits)
|
||||
T = TempSensor_max31865.vanDusen_temp(R) + self.temp_correction
|
||||
T = TempSensor_max31865.vanDusen_temp(R)
|
||||
print("Digits={}, R={:.3f} Ohm, T={:.2f} degC".format(digits, R, T))
|
||||
return T
|
||||
|
||||
|
||||
Reference in New Issue
Block a user