From 9ed3c70c013e4855fee5fe6cbd0ecb94545855f8 Mon Sep 17 00:00:00 2001 From: Manuel Weiser Date: Mon, 31 Mar 2025 10:08:26 +0200 Subject: [PATCH] fix: improve weight stability check before sending to API --- src/main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.cpp b/src/main.cpp index 3135fcc..d30d032 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -190,7 +190,7 @@ void loop() { } // Prüfen ob das Gewicht gleich bleibt und dann senden - if (weight == lastWeight && weight > 5) + if (abs(weight - lastWeight) <= 2 && weight > 5) { weigthCouterToApi++; }