set maxspread equal for tare and max
This commit is contained in:
parent
9fab6f4d16
commit
0c843e7507
|
@ -175,17 +175,16 @@ void loopHandler() {
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#define MAXSPREAD_TARE 0.1 //in kg, for tare can be lower than for measuring
|
#define MAXSPREAD 0.2 //in kg
|
||||||
if (spread<MAXSPREAD_TARE) { //if reading is stable
|
|
||||||
|
if (spread<MAXSPREAD) { //if reading is stable
|
||||||
if (weight_filtered<weight_tare) { //new min
|
if (weight_filtered<weight_tare) { //new min
|
||||||
weight_tare=weight_filtered;
|
weight_tare=weight_filtered;
|
||||||
update_display=true;
|
update_display=true;
|
||||||
Serial.print("new tare="); Serial.println(weight_tare,3);
|
Serial.print("new tare="); Serial.println(weight_tare,3);
|
||||||
last_display_blink=loopmillis; //blink
|
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
|
if (weight_filtered>weight_max) { //new max
|
||||||
weight_max=weight_filtered;
|
weight_max=weight_filtered;
|
||||||
update_display=true;
|
update_display=true;
|
||||||
|
|
Loading…
Reference in New Issue