From 53e8e20fca1332a0ce7935afb4431745b61355ec Mon Sep 17 00:00:00 2001 From: mgehre Date: Fri, 15 Nov 2013 12:12:17 +0000 Subject: [PATCH] =?UTF-8?q?MAXLAN:=20round=20maxValveSetting=20and=20valve?= =?UTF-8?q?Offset=20correctly=20(thanks=20to=20J=C3=BCrgen)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit git-svn-id: svn://svn.code.sf.net/p/fhem/code/trunk@4224 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/FHEM/00_MAXLAN.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fhem/FHEM/00_MAXLAN.pm b/fhem/FHEM/00_MAXLAN.pm index 2bbc6baa3..b7b4d7e7b 100755 --- a/fhem/FHEM/00_MAXLAN.pm +++ b/fhem/FHEM/00_MAXLAN.pm @@ -571,8 +571,8 @@ MAXLAN_Parse($$) $minsetpointtemp = MAXLAN_ExtractTemperature($minsetpointtemp); $windowopentemp = MAXLAN_ExtractTemperature($windowopentemp); $windowopendur *= 5; - $maxvalvesetting = int($maxvalvesetting*100/255); - $valveoffset = int($valveoffset*100/255); + $maxvalvesetting = int($maxvalvesetting*100/255 + 0.5); # + 0.5 for correct rounding + $valveoffset = int($valveoffset*100/255 + 0.5); # + 0.5 for correct rounding my $decalcDay = ($decalcifiction >> 5) & 0x07; my $decalcTime = $decalcifiction & 0x1F; Log $ll5, "comfortemp $comforttemp, ecotemp $ecotemp, boostValve $boostValve, boostDuration $boostDuration, tempoffset $tempoffset, minsetpointtemp $minsetpointtemp, maxsetpointtemp $maxsetpointtemp, windowopentemp $windowopentemp, windowopendur $windowopendur";