- changed gitignore

- make tempSensor Max31865 more robust against reading failures
- removed temp offset
This commit is contained in:
jens
2021-08-10 15:02:57 +01:00
parent 37cb2d146e
commit 289ef47bb6
3 changed files with 9 additions and 5 deletions
+6 -4
View File
@@ -45,13 +45,15 @@ class TempSensor_max31865(ATemperatureSensor):
return self.__tempRaw() + self.temp_offset
def __tempRaw(self):
T = 0
try:
digits = self.read_digits()
R = TempSensor_max31865.calc_R(430, digits)
T = TempSensor_max31865.vanDusen_temp(R)
# print("Digits={}, R={:.3f} Ohm, T={:.2f} degC".format(digits,$
except:
return None
R = TempSensor_max31865.calc_R(430, digits)
T = TempSensor_max31865.vanDusen_temp(R)
# print("Digits={}, R={:.3f} Ohm, T={:.2f} degC".format(digits, R, T))
pass
return T
@staticmethod