do not send waterlevel if not available
This commit is contained in:
parent
504286b30f
commit
5c014ded4b
|
@ -312,6 +312,8 @@ void waterlevel_loop(unsigned long loopmillis) {
|
|||
|
||||
//float _meanWaterlevel=getMeanf(waterlevelMean,WATERLEVELMEAN_SIZE);
|
||||
//Serial.print("\t Dist="); Serial.print(_filteredWaterlevel); Serial.print("mm"); Serial.print("(+- "); Serial.print((getMaxf(waterlevelMean,WATERLEVELMEAN_SIZE)-getMinf(waterlevelMean,WATERLEVELMEAN_SIZE))/2.0); Serial.print(")"); Serial.print(" [mean="); Serial.print(_meanWaterlevel); Serial.print("]");
|
||||
}else{
|
||||
waterlevelA=WATERLEVEL_UNAVAILABLE;
|
||||
}
|
||||
}
|
||||
waterlevel_loop_select++;
|
||||
|
@ -361,6 +363,8 @@ void waterlevel_loop(unsigned long loopmillis) {
|
|||
|
||||
//float _meanWaterlevel=getMeanf(waterlevelMean,WATERLEVELMEAN_SIZE);
|
||||
//Serial.print("\t Dist="); Serial.print(_filteredWaterlevel); Serial.print("mm"); Serial.print("(+- "); Serial.print((getMaxf(waterlevelMean,WATERLEVELMEAN_SIZE)-getMinf(waterlevelMean,WATERLEVELMEAN_SIZE))/2.0); Serial.print(")"); Serial.print(" [mean="); Serial.print(_meanWaterlevel); Serial.print("]");
|
||||
}else{
|
||||
waterlevelB=WATERLEVEL_UNAVAILABLE;
|
||||
}
|
||||
|
||||
waterlevel_loop_select=0;
|
||||
|
|
Loading…
Reference in New Issue