mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-09 07:44:19 +00:00
13_KS300.pm: deltasecs fix by Arno (Forum #61802)
git-svn-id: https://svn.fhem.de/fhem/trunk@12699 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a80876671b
commit
62a69400e8
@ -159,7 +159,7 @@ KS300_Parse($$)
|
||||
my $rain_raw_delta = $rain_raw - $rain_raw_prev;
|
||||
my $deltatsecs= ($tsecs - $tsecs_prev); # we have observed two datagrams at the same second
|
||||
$deltatsecs= 1 if($deltatsecs< 1);
|
||||
my $thours_delta = ($tsecs - $tsecs_prev)/3600.0; # in hours
|
||||
my $thours_delta = $deltatsecs/3600.0; # in hours
|
||||
my $rain_raw_per_hour = $rain_raw_delta/$thours_delta;
|
||||
if(($rain_raw_delta<0) || ($rain_raw_per_hour> 200.0)) {
|
||||
$rain_raw_ofs = $rain_raw_ofs_prev-$rain_raw_delta;
|
||||
|
Loading…
x
Reference in New Issue
Block a user