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

remove trace, correct all LED for LED16,improve virtual button

git-svn-id: https://svn.fhem.de/fhem/trunk@1935 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2012-10-07 10:20:59 +00:00
parent 3b92e381a0
commit ae906f9c5f

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 ". "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 ".
@ -1774,7 +1774,7 @@ CUL_HM_Set($@)
$col4all = $col4all.$col4all.$col4all.$col4all;#and now for 16 $col4all = $col4all.$col4all.$col4all.$col4all;#and now for 16
} }
elsif ($a[2] =~ m/^[A-Fa-f0-9]{1,8}$/i){ elsif ($a[2] =~ m/^[A-Fa-f0-9]{1,8}$/i){
$col4all = sprintf("Color:%08X",hex($a[2])); $col4all = sprintf("%08X",hex($a[2]));
} }
else{ else{
return "$a[2] unknown. use hex or: ".join(" ",sort keys(%color)); return "$a[2] unknown. use hex or: ".join(" ",sort keys(%color));
@ -2003,10 +2003,12 @@ CUL_HM_Set($@)
my $oldPeer; # only once to device, not channel! my $oldPeer; # only once to device, not channel!
foreach my $peer (sort @peerList){ foreach my $peer (sort @peerList){
next if ($oldPeer eq $peer); next if ($oldPeer eq $peer);
CUL_HM_SendCmd($hash, sprintf("++8440%s%s%s%s%02X", CUL_HM_SendCmd($hash, sprintf("++A440%s%s%s%02X",
$srcId,$peer,$srcChn,$btn,$pressCnt),1,0); $srcId,$peer,$btn,$pressCnt),1,0);
$oldPeer = $peer; $oldPeer = $peer;
} }
CUL_HM_SendCmd($hash, sprintf("++A440%s000000%s%02X",
$srcId,$btn,$pressCnt),1,0)if (!@peerList);
$hash->{helper}{count}=$pressCnt; $hash->{helper}{count}=$pressCnt;
} }
elsif($cmd eq "devicepair") { ############################################### elsif($cmd eq "devicepair") { ###############################################
@ -2026,7 +2028,7 @@ CUL_HM_Set($@)
($target ne"remote")&&($target ne"both"))); ($target ne"remote")&&($target ne"both")));
$single = ($single eq "single")?1:"";#default to dual $single = ($single eq "single")?1:"";#default to dual
$set = ($set eq "unset")?"":1; $set = ($set eq "unset")?"":1;
Log 1,"General :".$isChannel." chn:".$chn;
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 && !$chn);