2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 12:49:34 +00:00

CUL_HM: imlement dis-wm55 step 5 ... again

git-svn-id: https://svn.fhem.de/fhem/trunk@7717 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
martinp876 2015-01-25 17:12:49 +00:00
parent b55e6ad5db
commit 6cba6e4fbe

View File

@ -3909,8 +3909,8 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
CUL_HM_PushCmdStack($hash,$msg) if ($msg); CUL_HM_PushCmdStack($hash,$msg) if ($msg);
} }
elsif($cmd eq "displayWM" ) { ############################################### elsif($cmd eq "displayWM" ) { ###############################################
$state = "";
# textNo color icon # textNo color icon
# "HM-Dis-WM5501" =>{ displayWM =>"[long|short|help] <lineX> <textNo1> <color1> <icon1> [<textNo2> <color2> <icon2>] ...[<textNo6> <color6> <icon6>] "},
my %color=(white=>0,red=>1,orange=>2,yellow=>3,green=>4,blue=>5); my %color=(white=>0,red=>1,orange=>2,yellow=>3,green=>4,blue=>5);
my %icon=( off =>0, on=>1, open=>2, closed=>3, error=>4, ok=>5 my %icon=( off =>0, on=>1, open=>2, closed=>3, error=>4, ok=>5
,info=>6, newMsg=>7, serviceMsg=>8 ,info=>6, newMsg=>7, serviceMsg=>8
@ -4005,10 +4005,12 @@ sub CUL_HM_Set($@) {#+++++++++++++++++ set command+++++++++++++++++++++++++++++
my $dh = $hash->{helper}{dispi}{$t}{"$l"}; my $dh = $hash->{helper}{dispi}{$t}{"$l"};
my (undef,$ch,undef,$ln) = unpack('A3A2A1A1',$dh->{txt}); my (undef,$ch,undef,$ln) = unpack('A3A2A1A1',$dh->{txt});
$ch = sprintf("%02X",$ch); $ch = sprintf("%02X",$ch);
my $rd = ($dh->{txt}?"$dh->{txt} ":"- ")
.($dh->{col}?"$dh->{col} ":"- ")
.($dh->{icn}?"$dh->{icn} ":"- ")
."->";
readingsSingleUpdate($hash,"disp_${ts}_$l", readingsSingleUpdate($hash,"disp_${ts}_$l",
"$dh->{txt} $dh->{col} $dh->{icn} ->" $rd.ReadingsVal(InternalVal($devName,"channel_$ch","no")
.ReadingsVal(InternalVal($devName,"channel_$ch","no")
,"text$ln","unkown") ,"text$ln","unkown")
,0); ,0);
$msg .= sprintf("12%02X",$btn{$dh->{txt} }+0x80)if ($dh->{txt}); $msg .= sprintf("12%02X",$btn{$dh->{txt} }+0x80)if ($dh->{txt});