allow only meaningful readings (fill level > -5%) in USF1000
git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@633 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -577,7 +577,7 @@
|
|||||||
(Gerhard Pfeffer / MartinH)
|
(Gerhard Pfeffer / MartinH)
|
||||||
- feature: pgm2 style changes, SVG in background, optional compression
|
- feature: pgm2 style changes, SVG in background, optional compression
|
||||||
|
|
||||||
- =DATE= (5.0)
|
- =DATE= (4.10)
|
||||||
- feature: KM271: Read only
|
- feature: KM271: Read only
|
||||||
- bugfix: 99_SUNRISE_EL endless loop bug
|
- bugfix: 99_SUNRISE_EL endless loop bug
|
||||||
- feature: CUL: optional baudrate spec in definition
|
- feature: CUL: optional baudrate spec in definition
|
||||||
@@ -587,3 +587,4 @@
|
|||||||
- feature: FHEMWEB javascript additions for SVG plots (click on lines/labels)
|
- feature: FHEMWEB javascript additions for SVG plots (click on lines/labels)
|
||||||
- feature: FHEMWEB smallscreen attribute
|
- feature: FHEMWEB smallscreen attribute
|
||||||
- feature: Dimmer function of X10 module changed to match FS20 dimmer functions.
|
- feature: Dimmer function of X10 module changed to match FS20 dimmer functions.
|
||||||
|
- feature: allow only meaningful readings (fill level > -5%) in USF1000
|
||||||
@@ -137,6 +137,9 @@ USF1000_Parse($$)
|
|||||||
$flevel = int($volume/$capacity*100.0+0.5);
|
$flevel = int($volume/$capacity*100.0+0.5);
|
||||||
$volume= int($volume/10.0+0.5)*10.0;
|
$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);
|
my $state= sprintf("v: %d V: %d", $flevel, $volume);
|
||||||
|
|
||||||
@@ -153,6 +156,7 @@ USF1000_Parse($$)
|
|||||||
$def->{READINGS}{volume}{TIME} = $t;
|
$def->{READINGS}{volume}{TIME} = $t;
|
||||||
$def->{READINGS}{volume}{VAL} = $volume;
|
$def->{READINGS}{volume}{VAL} = $volume;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
my $warnings= ($lowbattery ? "Battery low" : "");
|
my $warnings= ($lowbattery ? "Battery low" : "");
|
||||||
if($testmode) {
|
if($testmode) {
|
||||||
|
|||||||
Reference in New Issue
Block a user