From: Bernhard Tittelbach Date: Thu, 16 Feb 2012 21:43:28 +0000 (+0000) Subject: realraum codes für schwarze FB X-Git-Url: https://git.realraum.at/?a=commitdiff_plain;h=451f10a78750681c70cb644d9b9bb40a9a4d98eb;p=svn42.git realraum codes für schwarze FB --- diff --git a/rf433rcv/pc/realraum_codes.pl b/rf433rcv/pc/realraum_codes.pl index 6508167..91bab77 100755 --- a/rf433rcv/pc/realraum_codes.pl +++ b/rf433rcv/pc/realraum_codes.pl @@ -3,7 +3,7 @@ use strict; my %remotes = ( - schwarz => [\&schwarz, "01110101a1b1c1000000dddd"] , + schwarz => [\&schwarz, "swia1b1c1000000dddd"] , weiss => [\&weiss,"0c0d01010b0001010001010a"], pollin => [\&pollin,"0q0w0e0r0tbbbbbbbbbbaaaa"], rsl336t => [\&rsl336t,"switchbutton010101oo"], @@ -31,9 +31,20 @@ sub main sub schwarz { - my ($swicht_cnt, $on) = @_ or die "parameters swicht_cnt {0|1}"; - my $data = {a=>0, b=> 0, c=> 0, dddd=> ($on? "1100":"0011")}; - $data->{chr(ord('a')+$swicht_cnt-1)}=1; + my ($switch, $button, $on) = @_ or die "parameters {a|b|c|d} {1|2|3} {0|1}"; + my $switchdata = { + a => '11010101', + b => '01110101', + c => '01011101', + d => '01010111', + }; + my $data = { + swi=> $switchdata->{$switch}, + a=> 0, + b=> 0, + c=> 0, + dddd=> ($on? "1100":"0011")}; + $data->{chr(ord('a')+$button-1)}=1; return $data; }