From cd54b1896a63fec94b701611cb5afeb05f7c4a92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicol=C3=B2=20Balzarotti?= Date: Wed, 22 Feb 2023 00:38:07 +0100 Subject: [PATCH] disable smooth --- sensors.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/sensors.py b/sensors.py index 82290a0..a01ef4a 100644 --- a/sensors.py +++ b/sensors.py @@ -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):