Max31865: no smoothing
git-svn-id: http://moon:8086/svn/projects/HendiControl@203 fda53097-d464-4ada-af97-ba876c37ca34
This commit is contained in:
@@ -15,7 +15,6 @@ class Max31865(ATemperatureSensor):
|
||||
self.spi.mode = 0b01
|
||||
self.write_reg(0x00, 0xA3)
|
||||
self.temp_correction = -0.2
|
||||
self.temp = self.__tempRaw()
|
||||
|
||||
def read_reg(self, addr):
|
||||
reg = self.spi.xfer([addr, 0xFF])
|
||||
@@ -34,8 +33,7 @@ class Max31865(ATemperatureSensor):
|
||||
return digits
|
||||
|
||||
def temperature(self):
|
||||
self.temp = 0.5*self.temp + 0.5*self.__tempRaw()
|
||||
return round(self.temp, 1)
|
||||
return round(self.__tempRaw(), 1)
|
||||
|
||||
def __tempRaw(self):
|
||||
digits = self.read_digits()
|
||||
|
||||
Reference in New Issue
Block a user