do not send waterlevel if not available

This commit is contained in:
interfisch 2024-05-16 07:52:35 +02:00
parent 504286b30f
commit 5c014ded4b
1 changed files with 4 additions and 0 deletions

View File

@ -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;