|
|
|
@ -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();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|