set maxspread equal for tare and max

This commit is contained in:
interfisch 2021-03-08 19:31:11 +01:00
parent 9fab6f4d16
commit 0c843e7507
1 changed files with 4 additions and 5 deletions

View File

@ -175,17 +175,16 @@ void loopHandler() {
#define MAXSPREAD_TARE 0.1 //in kg, for tare can be lower than for measuring
if (spread<MAXSPREAD_TARE) { //if reading is stable
#define MAXSPREAD 0.2 //in kg
if (spread<MAXSPREAD) { //if reading is stable
if (weight_filtered<weight_tare) { //new min
weight_tare=weight_filtered;
update_display=true;
Serial.print("new tare="); Serial.println(weight_tare,3);
last_display_blink=loopmillis; //blink
}
}
#define MAXSPREAD_MEASURE 0.5 //in kg
if (spread<MAXSPREAD_MEASURE) { //if reading is stable
if (weight_filtered>weight_max) { //new max
weight_max=weight_filtered;
update_display=true;