Merge branch 'master' of moon:/srv/repos/git/brewpi
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
__pycache__
|
__pycache__
|
||||||
|
.gitignore
|
||||||
.idea/
|
.idea/
|
||||||
config.json
|
config.json
|
||||||
|
*.mat
|
||||||
|
|
||||||
@@ -45,13 +45,15 @@ class TempSensor_max31865(ATemperatureSensor):
|
|||||||
return self.__tempRaw() + self.temp_offset
|
return self.__tempRaw() + self.temp_offset
|
||||||
|
|
||||||
def __tempRaw(self):
|
def __tempRaw(self):
|
||||||
|
T = 0
|
||||||
try:
|
try:
|
||||||
digits = self.read_digits()
|
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:
|
except:
|
||||||
return None
|
pass
|
||||||
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))
|
|
||||||
return T
|
return T
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
|
|||||||
@@ -8,4 +8,4 @@ class TempSensorFactory:
|
|||||||
return TempSensorSim()
|
return TempSensorSim()
|
||||||
elif "31865" in name:
|
elif "31865" in name:
|
||||||
from components.sensor.tempSensor_max31865 import TempSensor_max31865
|
from components.sensor.tempSensor_max31865 import TempSensor_max31865
|
||||||
return TempSensor_max31865(temp_offset=-1.2)
|
return TempSensor_max31865(temp_offset=0)
|
||||||
|
|||||||
Reference in New Issue
Block a user