2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-03 10:46:53 +00:00

allow only meaningful readings (fill level > -5%) in USF1000

git-svn-id: https://svn.fhem.de/fhem/trunk@633 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
borisneubert 2010-05-15 17:20:21 +00:00
parent 63a5cd353c
commit ed3b186322
2 changed files with 19 additions and 14 deletions

View File

@ -577,7 +577,7 @@
(Gerhard Pfeffer / MartinH)
- feature: pgm2 style changes, SVG in background, optional compression
- =DATE= (5.0)
- =DATE= (4.10)
- feature: KM271: Read only
- bugfix: 99_SUNRISE_EL endless loop bug
- feature: CUL: optional baudrate spec in definition
@ -587,3 +587,4 @@
- feature: FHEMWEB javascript additions for SVG plots (click on lines/labels)
- feature: FHEMWEB smallscreen attribute
- feature: Dimmer function of X10 module changed to match FS20 dimmer functions.
- feature: allow only meaningful readings (fill level > -5%) in USF1000

View File

@ -137,6 +137,9 @@ USF1000_Parse($$)
$flevel = int($volume/$capacity*100.0+0.5);
$volume= int($volume/10.0+0.5)*10.0;
if($flevel>-5) {
# reflections may lead to false reading (distance too large)
# the meaningless results are suppressed
my $state= sprintf("v: %d V: %d", $flevel, $volume);
@ -153,6 +156,7 @@ USF1000_Parse($$)
$def->{READINGS}{volume}{TIME} = $t;
$def->{READINGS}{volume}{VAL} = $volume;
}
}
my $warnings= ($lowbattery ? "Battery low" : "");
if($testmode) {