From 351786eb945454424c100d06d799ddc9530879ac Mon Sep 17 00:00:00 2001 From: Edwin Eefting Date: Sat, 1 Aug 2020 19:05:06 +0200 Subject: [PATCH] moving average now 1% instead of 10 --- micropython/cat.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/micropython/cat.py b/micropython/cat.py index 2366d83..6da12fb 100644 --- a/micropython/cat.py +++ b/micropython/cat.py @@ -60,4 +60,4 @@ def ate(self, weight): def update_weight(self, weight): '''update weight by moving average''' - self.state.weight=self.state.weight*0.9 + weight*0.1 + self.state.weight=self.state.weight*0.99 + weight*0.01