From 2f9bf92935d64dff30533f4636745d99050b7bd1 Mon Sep 17 00:00:00 2001 From: justme-1968 Date: Mon, 17 Nov 2014 20:11:17 +0000 Subject: [PATCH] 98_logProxy.pm: fix for value = 0 -> use defined($x) instead of $x git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@7013 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- FHEM/98_logProxy.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/FHEM/98_logProxy.pm b/FHEM/98_logProxy.pm index 54f0e76a9..9fa645cb7 100644 --- a/FHEM/98_logProxy.pm +++ b/FHEM/98_logProxy.pm @@ -520,7 +520,7 @@ logProxy_clipData($$$$;$) } } else { - if( !$ret && $prev_value && $sec < $from ) { + if( !$ret && defined($prev_value) ) { my $value = $prev_value; $value = logProxy_linearInterpolate( SVG_time_to_sec($prev_timestamp), $prev_value, SVG_time_to_sec($d), $v, $from ) if( $interpolate ); @@ -543,7 +543,7 @@ logProxy_clipData($$$$;$) } #if predict is set -> extend bejond last value - if( defined($predict) && !$next_value ) { + if( defined($predict) && !defined($next_value) ) { $next_value = $prev_value; #if $predict = 0 -> predict to end of plot @@ -559,7 +559,7 @@ logProxy_clipData($$$$;$) $next_timestamp = sprintf("%04d-%02d-%02d_%02d:%02d:%02d", $t[5]+1900, $t[4]+1, $t[3], $t[2], $t[1], $t[0]); } - if( $next_value ) { + if( defined($next_value) ) { my $value = $prev_value; $value = logProxy_linearInterpolate( SVG_time_to_sec($prev_timestamp), $prev_value, SVG_time_to_sec($next_timestamp), $next_value, $to ) if( $interpolate );