From fe56696b4ed4fb32ce0e738f8c07a8cd441b8a6d Mon Sep 17 00:00:00 2001 From: Fisch Date: Sat, 10 Apr 2021 15:51:31 +0200 Subject: [PATCH] remove self power off after measurement --- src/main.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/main.cpp b/src/main.cpp index f3d1353..6dcaec8 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -220,13 +220,12 @@ void loop() { } - - - - #define STAYONTIME_AFTER_SENT 5000 #define STAYONTIME_IDLE 20000 //how long to stay on (ms) after no change in weight detected - if (millis() > MAXONTIME || (weight_sent && millis()>weight_sent_time+STAYONTIME_AFTER_SENT) || millis()>last_weightchange+STAYONTIME_IDLE) { + + //#define STAYONTIME_AFTER_SENT 5000 + //if (millis() > MAXONTIME || (weight_sent && millis()>weight_sent_time+STAYONTIME_AFTER_SENT) || millis()>last_weightchange+STAYONTIME_IDLE) { + if (millis() > MAXONTIME || millis()>last_weightchange+STAYONTIME_IDLE) { powerOff(); }