1
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-05-07 22:29:19 +00:00

correct devicepair dual, virtual command list and attr peerList

git-svn-id: https://svn.fhem.de/fhem/trunk@1937 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2012-10-07 18:02:45 +00:00
parent 9a21e5ee40
commit 0931622367

View File

@ -202,7 +202,7 @@ CUL_HM_Initialize($)
"showtime:1,0 loglevel:0,1,2,3,4,5,6 " . "showtime:1,0 loglevel:0,1,2,3,4,5,6 " .
"hmClass:receiver,sender serialNr firmware devInfo ". "hmClass:receiver,sender serialNr firmware devInfo ".
"rawToReadable unit ". "rawToReadable unit ".
"chanNo device peerList". "chanNo device peerList ".
"protCmdPend protLastRcv protSndCnt protSndLast protCmdDel protNackCnt protNackLast rxType ". "protCmdPend protLastRcv protSndCnt protSndLast protCmdDel protNackCnt protNackLast rxType ".
"channel_01 channel_02 channel_03 channel_04 channel_05 channel_06 ". "channel_01 channel_02 channel_03 channel_04 channel_05 channel_06 ".
"channel_07 channel_08 channel_09 channel_0A channel_0B channel_0C ". "channel_07 channel_08 channel_09 channel_0A channel_0B channel_0C ".
@ -1389,7 +1389,8 @@ CUL_HM_Set($@)
} }
elsif(!defined($h)) { elsif(!defined($h)) {
my @arr = keys %culHmGlobalSets if($st ne "virtual"); my @arr;
@arr = keys %culHmGlobalSets if($st ne "virtual");
push @arr, keys %{$culHmSubTypeSets{$st}} if($culHmSubTypeSets{$st}); push @arr, keys %{$culHmSubTypeSets{$st}} if($culHmSubTypeSets{$st});
push @arr, keys %{$culHmModelSets{$md}} if($culHmModelSets{$md}); push @arr, keys %{$culHmModelSets{$md}} if($culHmModelSets{$md});
my $usg = "Unknown argument $cmd, choose one of ".join(" ",sort @arr); my $usg = "Unknown argument $cmd, choose one of ".join(" ",sort @arr);
@ -2031,7 +2032,7 @@ CUL_HM_Set($@)
my ($b1,$b2,$nrCh2Pair); my ($b1,$b2,$nrCh2Pair);
$b1 = ($isChannel) ? hex($chn):sprintf("%02X",$bNo); $b1 = ($isChannel) ? hex($chn):sprintf("%02X",$bNo);
$b1 = $b1*2 - 1 if($single && !$chn); $b1 = $b1*2 - 1 if(!$single && !$isChannel);
if ($single){ if ($single){
$b2 = $b1; $b2 = $b1;
$nrCh2Pair = 1; $nrCh2Pair = 1;
@ -2068,6 +2069,7 @@ CUL_HM_Set($@)
$peerlist =~ s/$repl//;#avoid duplicate $peerlist =~ s/$repl//;#avoid duplicate
$peerlist.= $repl if($set == 1); $peerlist.= $repl if($set == 1);
$attr{$btnName}{peerList} = $peerlist; $attr{$btnName}{peerList} = $peerlist;
delete $attr{$btnName}{peerList} if (!$peerlist);
} }
else{ else{
my $bStr = sprintf("%02X",$b); my $bStr = sprintf("%02X",$b);