mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 19:04:20 +00:00
git-svn-id: https://svn.fhem.de/fhem/trunk@1676 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
a4a34e362a
commit
79921fefbc
@ -12,7 +12,7 @@
|
|||||||
#
|
#
|
||||||
# Prof. Dr. Peter A. Henning, 2012
|
# Prof. Dr. Peter A. Henning, 2012
|
||||||
#
|
#
|
||||||
# Version 2.0 - June, 2012
|
# Version 2.01 - June, 2012
|
||||||
#
|
#
|
||||||
# Setup bus device in fhem.cfg as
|
# Setup bus device in fhem.cfg as
|
||||||
#
|
#
|
||||||
@ -743,13 +743,9 @@ sub OWXLCD_SetFunction($$$) {
|
|||||||
|
|
||||||
my ($select, $res, $res2, $res3, @data);
|
my ($select, $res, $res2, $res3, @data);
|
||||||
|
|
||||||
#-- ID of the device
|
#-- ID of the device, hash of the busmaster
|
||||||
my $owx_dev = $hash->{ROM_ID};
|
my $owx_dev = $hash->{ROM_ID};
|
||||||
my $owx_rnf = substr($owx_dev,3,12);
|
my $master = $hash->{IODev};
|
||||||
my $owx_f = substr($owx_dev,0,2);
|
|
||||||
|
|
||||||
#-- hash of the busmaster
|
|
||||||
my $master = $hash->{IODev};
|
|
||||||
|
|
||||||
my ($i,$j,$k);
|
my ($i,$j,$k);
|
||||||
|
|
||||||
@ -810,13 +806,9 @@ sub OWXLCD_SetIcon($$$) {
|
|||||||
|
|
||||||
my ($i,$data,$select, $res);
|
my ($i,$data,$select, $res);
|
||||||
|
|
||||||
#-- ID of the device
|
#-- ID of the device, hash of the busmaster
|
||||||
my $owx_dev = $hash->{ROM_ID};
|
my $owx_dev = $hash->{ROM_ID};
|
||||||
my $owx_rnf = substr($owx_dev,3,12);
|
my $master = $hash->{IODev};
|
||||||
my $owx_f = substr($owx_dev,0,2);
|
|
||||||
|
|
||||||
#-- hash of the busmaster
|
|
||||||
my $master = $hash->{IODev};
|
|
||||||
|
|
||||||
#-- only for KS0073
|
#-- only for KS0073
|
||||||
if ( $lcdcontroller eq "KS0073"){
|
if ( $lcdcontroller eq "KS0073"){
|
||||||
@ -829,7 +821,7 @@ sub OWXLCD_SetIcon($$$) {
|
|||||||
$res=OWX_Complex($master,$owx_dev,$select,0);
|
$res=OWX_Complex($master,$owx_dev,$select,0);
|
||||||
|
|
||||||
#-- SEGRAM addres to 0 = \x40,
|
#-- SEGRAM addres to 0 = \x40,
|
||||||
$select = "x10\x40";
|
$select = "\x10\x40";
|
||||||
#-- write 16 zeros to scratchpad
|
#-- write 16 zeros to scratchpad
|
||||||
$select .= "\x4E\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
|
$select .= "\x4E\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00";
|
||||||
OWX_Reset($master);
|
OWX_Reset($master);
|
||||||
@ -846,7 +838,7 @@ sub OWXLCD_SetIcon($$$) {
|
|||||||
$data = 0;
|
$data = 0;
|
||||||
} elsif ( $value == 1) {
|
} elsif ( $value == 1) {
|
||||||
$data = 16;
|
$data = 16;
|
||||||
} elsif ( $value == 2) {
|
} elsif ( $value == 2) {
|
||||||
$data = 80;
|
$data = 80;
|
||||||
} else {
|
} else {
|
||||||
return "OWXLCD: Wrong data value $value for icon $icon";
|
return "OWXLCD: Wrong data value $value for icon $icon";
|
||||||
@ -885,6 +877,7 @@ sub OWXLCD_SetIcon($$$) {
|
|||||||
OWX_Reset($master);
|
OWX_Reset($master);
|
||||||
$res=OWX_Complex($master,$owx_dev,$select,0);
|
$res=OWX_Complex($master,$owx_dev,$select,0);
|
||||||
}
|
}
|
||||||
|
|
||||||
#-- return to normal state
|
#-- return to normal state
|
||||||
$select = "\x10\x20";
|
$select = "\x10\x20";
|
||||||
OWX_Reset($master);
|
OWX_Reset($master);
|
||||||
@ -923,17 +916,13 @@ sub OWXLCD_SetLine($$$) {
|
|||||||
$msg =~ s/ß/\xBE/g;
|
$msg =~ s/ß/\xBE/g;
|
||||||
|
|
||||||
#--take out degree sign
|
#--take out degree sign
|
||||||
if( $msg ~ m/.*\°\;.*/ ) {
|
if( $msg =~ m/.*\°\;.*/ ) {
|
||||||
my @ma = split(/\°\;/,$msg);
|
my @ma = split(/\°\;/,$msg);
|
||||||
$msg = $ma[0]."\x80".$ma[1];
|
$msg = $ma[0]."\x80".$ma[1];
|
||||||
}
|
}
|
||||||
#-- ID of the device
|
#-- ID of the device, hash of the busmaster
|
||||||
my $owx_dev = $hash->{ROM_ID};
|
my $owx_dev = $hash->{ROM_ID};
|
||||||
my $owx_rnf = substr($owx_dev,3,12);
|
my $master = $hash->{IODev};
|
||||||
my $owx_f = substr($owx_dev,0,2);
|
|
||||||
|
|
||||||
#-- hash of the busmaster
|
|
||||||
my $master = $hash->{IODev};
|
|
||||||
|
|
||||||
#-- split if longer than 16 bytes, fill each with blanks
|
#-- split if longer than 16 bytes, fill each with blanks
|
||||||
# has already been checked to be <= $lcdchars
|
# has already been checked to be <= $lcdchars
|
||||||
@ -963,7 +952,7 @@ sub OWXLCD_SetLine($$$) {
|
|||||||
|
|
||||||
#-- issue the match ROM command \x55 and the write scratchpad command \x4E
|
#-- issue the match ROM command \x55 and the write scratchpad command \x4E
|
||||||
# followed by LCD page address and the text
|
# followed by LCD page address and the text
|
||||||
$select=sprintf("\x4E\%c",@owx_ROM_ID,$lcdpage[$line]).$msgA;
|
$select=sprintf("\x4E%c",$lcdpage[$line]).$msgA;
|
||||||
OWX_Reset($master);
|
OWX_Reset($master);
|
||||||
$res=OWX_Complex($master,$owx_dev,$select,0);
|
$res=OWX_Complex($master,$owx_dev,$select,0);
|
||||||
|
|
||||||
@ -977,12 +966,12 @@ sub OWXLCD_SetLine($$$) {
|
|||||||
#select(undef,undef,undef,0.005);
|
#select(undef,undef,undef,0.005);
|
||||||
#-- issue the match ROM command \x55 and the write scratchpad command \x4E
|
#-- issue the match ROM command \x55 and the write scratchpad command \x4E
|
||||||
# followed by LCD page address and the text
|
# followed by LCD page address and the text
|
||||||
$select=sprintf("\x4E\%c",@owx_ROM_ID,$lcdpage[$line]+16).$msgB;
|
$select=sprintf("\x4E%c",$lcdpage[$line]+16).$msgB;
|
||||||
OWX_Reset($master);
|
OWX_Reset($master);
|
||||||
$res2=OWX_Complex($master,$owx_dev,$select,0);
|
$res2=OWX_Complex($master,$owx_dev,$select,0);
|
||||||
|
|
||||||
#-- issue the copy scratchpad to LCD command \x48
|
#-- issue the copy scratchpad to LCD command \x48
|
||||||
$select="x48";
|
$select="\x48";
|
||||||
OWX_Reset($master);
|
OWX_Reset($master);
|
||||||
$res3=OWX_Complex($master,$owx_dev,$select,0);
|
$res3=OWX_Complex($master,$owx_dev,$select,0);
|
||||||
}
|
}
|
||||||
@ -1014,13 +1003,9 @@ sub OWXLCD_SetMemory($$$) {
|
|||||||
$page = int($page);
|
$page = int($page);
|
||||||
$msg = defined($msg) ? $msg : "";
|
$msg = defined($msg) ? $msg : "";
|
||||||
|
|
||||||
#-- ID of the device
|
#-- ID of the device, hash of the busmaster
|
||||||
my $owx_dev = $hash->{ROM_ID};
|
my $owx_dev = $hash->{ROM_ID};
|
||||||
my $owx_rnf = substr($owx_dev,3,12);
|
my $master = $hash->{IODev};
|
||||||
my $owx_f = substr($owx_dev,0,2);
|
|
||||||
|
|
||||||
#-- hash of the busmaster
|
|
||||||
my $master = $hash->{IODev};
|
|
||||||
|
|
||||||
#-- fillup with blanks
|
#-- fillup with blanks
|
||||||
$msgA = $msg;
|
$msgA = $msg;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user