diff --git a/src/main.cpp b/src/main.cpp index d4e33bc..3452122 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -104,7 +104,7 @@ unsigned long time_adcwait=1000/spsadc; int adc_readings=1; //ca. 700ms for 5 readings, ca 75ms for 1 reading, readings=1 10times = 747ms double weight=0; -#define ADCMEDIANVALUES_MAX 93 //needs to be uneven, maximum number, for array declaration +#define ADCMEDIANVALUES_MAX 91 //needs to be uneven, maximum number, for array declaration float weightseries[ADCMEDIANVALUES_MAX]; //last n values for median filter uint16_t adcmedianvalues=DEFAULT_ADCMEDIANVALUES; //needs to be uneven //eeprom float adcFilterKeepMedianvaluesFactor=0.8; //how many lowest and highest values will be removed from the array before avaraging (as factor). 0.0 means only median is used. 1.0 means all values are used. @@ -999,7 +999,7 @@ float getWeightSeriesMax() } String toWeightString(double w){ - return toWeightString(w,2,6); + return toWeightString(w,3,6); } String toWeightString(double w,uint8_t dec,uint8_t len){ char outstring[16];