disable smooth

master
Nicolò Balzarotti 2023-02-22 00:38:07 +01:00
parent 58d412d038
commit cd54b1896a
1 changed files with 4 additions and 2 deletions

View File

@ -49,12 +49,14 @@ class Sensor():
def smooth(self):
# TODO: Implement *correctly* this (take into account the time)
m = mean([el[1] for el in self.history])
# m = mean([el[1] for el in self.history])
# Non mi piace proprio in realtà
return (self.history[-1][0], m)
def store(self, value, time):
self.history.append((value, time))
return self.smooth()
# self.smooth()
return (value, time)
class GPIOState(Sensor):