2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

98_logProxy.pm: calculate min and max for logProxy_xy2Plot

git-svn-id: https://svn.fhem.de/fhem/trunk@11479 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
justme-1968 2016-05-18 13:11:16 +00:00
parent b7481cac4b
commit a4e5d2c92e

View File

@ -710,7 +710,13 @@ logProxy_xy2Plot($)
return ($ret,$min,$max,$last) if( !ref($array) eq "ARRAY" );
foreach my $point ( @{$array} ) {
$ret .= ";p $point->[0] $point->[1]\n";
my $value = $point->[1];
$min = $value if( $value < $min );
$max = $value if( $value > $max );
$last = $value;
$ret .= ";p $point->[0] $value\n";
}
return ($ret,$min,$max,$last);