OWX: allow to pass ARRAY-ref to OWX_CRC

git-svn-id: https://svn.fhem.de/fhem/trunk@5439 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
ntruchsess
2014-04-04 20:48:09 +00:00
parent fa466fe85c
commit 70acf18aec

View File

@@ -404,6 +404,10 @@ sub OWX_CRC ($) {
$crc8 = $crc8_table[ $crc8 ^ $owx_ROM_ID[$i] ];
}
return $crc8;
} elsif (ref($romid) eq "ARRAY") {
for(my $i=0; $i<8; $i++){
$crc8 = $crc8_table[ $crc8 ^ $romid->[$i] ];
}
} else {
#-- from search string to byte id
$romid=~s/\.//g;