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

10_KNX.pm: changed sprintf for int-dpt from %d to %.0f

git-svn-id: https://svn.fhem.de/fhem/trunk@11643 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
andi291 2016-06-10 14:43:04 +00:00
parent 66b598cf11
commit 5fe71cfcd1

View File

@ -14,6 +14,7 @@
# ABU 20160422 Added dpt9.021 - mA
# ABU 20160529 Changed Doku
# ABU 20160605 Changed Doku, changed autocreate-naming, fixed dpt10-sending-now
# ABU 20160608 changed sprintf for int-dpt from %d to %.0f
package main;
@ -1282,7 +1283,7 @@ decodeByDpt ($$$) {
$state -= $offset if (defined ($offset));
$state *= $factor if (defined ($factor));
$state = sprintf ("%d", $state);
$state = sprintf ("%.0f", $state);
}
#1-Octet unsigned value
elsif ($code eq "dpt5")
@ -1294,7 +1295,7 @@ decodeByDpt ($$$) {
$state -= $offset if (defined ($offset));
$state *= $factor if (defined ($factor));
$state = sprintf ("%d", $state);
$state = sprintf ("%.0f", $state);
}
#1-Octet signed value
elsif ($code eq "dpt6")
@ -1307,7 +1308,7 @@ decodeByDpt ($$$) {
$state -= $offset if (defined ($offset));
$state *= $factor if (defined ($factor));
$state = sprintf ("%d", $state);
$state = sprintf ("%.0f", $state);
}
#2-Octet unsigned Value
elsif ($code eq "dpt7")
@ -1319,7 +1320,7 @@ decodeByDpt ($$$) {
$state -= $offset if (defined ($offset));
$state *= $factor if (defined ($factor));
$state = sprintf ("%d", $state);
$state = sprintf ("%.0f", $state);
}
#2-Octet signed Value
elsif ($code eq "dpt8")
@ -1332,7 +1333,7 @@ decodeByDpt ($$$) {
$state -= $offset if (defined ($offset));
$state *= $factor if (defined ($factor));
$state = sprintf ("%d", $state);
$state = sprintf ("%.0f", $state);
}
#2-Octet Float value
elsif ($code eq "dpt9")
@ -1384,7 +1385,7 @@ decodeByDpt ($$$) {
$state -= $offset if (defined ($offset));
$state *= $factor if (defined ($factor));
$state = sprintf ("%d", $state);
$state = sprintf ("%.0f", $state);
}
#4-Octet Signed Value
elsif ($code eq "dpt13")
@ -1397,7 +1398,7 @@ decodeByDpt ($$$) {
$state -= $offset if (defined ($offset));
$state *= $factor if (defined ($factor));
$state = sprintf ("%d", $state);
$state = sprintf ("%.0f", $state);
}
#4-Octet single precision float
elsif ($code eq "dpt14")