MAX: format firmware field (by Jürgen)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@4223 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mgehre 2013-11-15 12:12:09 +00:00
parent 860fa97a16
commit 890ace12a6
2 changed files with 2 additions and 2 deletions

View File

@ -545,7 +545,7 @@ MAXLAN_Parse($$)
my $dhash = $modules{MAX}{defptr}{$addr}; my $dhash = $modules{MAX}{defptr}{$addr};
if(defined($dhash)) { if(defined($dhash)) {
readingsBeginUpdate($dhash); readingsBeginUpdate($dhash);
readingsBulkUpdate($dhash, "firmware", $firmware); readingsBulkUpdate($dhash, "firmware", sprintf("%u.%u",int($firmware/16),$firmware%16));
readingsBulkUpdate($dhash, "testresult", $testresult); readingsBulkUpdate($dhash, "testresult", $testresult);
readingsEndUpdate($dhash, 1); readingsEndUpdate($dhash, 1);
} }

View File

@ -329,7 +329,7 @@ CUL_MAX_Parse($$)
my $dhash = CUL_MAX_DeviceHash($src); my $dhash = CUL_MAX_DeviceHash($src);
if(defined($dhash)) { if(defined($dhash)) {
readingsBeginUpdate($dhash); readingsBeginUpdate($dhash);
readingsBulkUpdate($dhash, "firmware", $firmware); readingsBulkUpdate($dhash, "firmware", sprintf("%u.%u",int($firmware/16),$firmware%16));
readingsBulkUpdate($dhash, "testresult", $testresult); readingsBulkUpdate($dhash, "testresult", $testresult);
readingsEndUpdate($dhash, 1); readingsEndUpdate($dhash, 1);
} }