44_S7: Bugfixes

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@15539 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
charlie71 2017-12-01 21:52:13 +00:00
parent 6b2ba75903
commit 61a6215bc6
4 changed files with 8 additions and 8 deletions

View File

@ -352,11 +352,11 @@ sub S7_ARead_Parse($$) {
my $mv = $1;
my $last_value = $h->{".attreocr-threshold$reading"};
if( !defined($last_value) ) {
$h->{".attreocr-threshold$reading"} = $mv;
# $h->{".attreocr-threshold$reading"} = $mv;
} elsif( abs($mv - $last_value) < $threshold ) {
$eocr = 0;
} else {
$h->{".attreocr-threshold$reading"} = $mv;
# $h->{".attreocr-threshold$reading"} = $mv;
}
}
}

View File

@ -494,11 +494,11 @@ sub S7_AWrite_Parse($$) {
my $mv = $1;
my $last_value = $h->{".attreocr-threshold$reading"};
if( !defined($last_value) ) {
$h->{".attreocr-threshold$reading"} = $mv;
# $h->{".attreocr-threshold$reading"} = $mv;
} elsif( abs($mv - $last_value) < $threshold ) {
$eocr = 0;
} else {
$h->{".attreocr-threshold$reading"} = $mv;
# $h->{".attreocr-threshold$reading"} = $mv;
}
}
}

View File

@ -421,11 +421,11 @@ sub S7_DRead_Parse($$) {
my $mv = $1;
my $last_value = $h->{".attreocr-threshold$reading"};
if( !defined($last_value) ) {
$h->{".attreocr-threshold$reading"} = $mv;
# $h->{".attreocr-threshold$reading"} = $mv;
} elsif( abs($mv - $last_value) < $threshold ) {
$eocr = 0;
} else {
$h->{".attreocr-threshold$reading"} = $mv;
# $h->{".attreocr-threshold$reading"} = $mv;
}
}
}

View File

@ -497,11 +497,11 @@ sub S7_DWrite_setABit($$) {
my $mv = $1;
my $last_value = $h->{".attreocr-threshold$reading"};
if( !defined($last_value) ) {
$h->{".attreocr-threshold$reading"} = $mv;
# $h->{".attreocr-threshold$reading"} = $mv;
} elsif( abs($mv - $last_value) < $threshold ) {
$eocr = 0;
} else {
$h->{".attreocr-threshold$reading"} = $mv;
# $h->{".attreocr-threshold$reading"} = $mv;
}
}
}