From 451f10a78750681c70cb644d9b9bb40a9a4d98eb Mon Sep 17 00:00:00 2001 From: Bernhard Tittelbach Date: Thu, 16 Feb 2012 21:43:28 +0000 Subject: [PATCH] =?utf8?q?realraum=20codes=20f=C3=BCr=20schwarze=20FB?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- rf433rcv/pc/realraum_codes.pl | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) 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; } -- 1.7.10.4