mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 23:06:37 +00:00
OWSWITCH.pm: Bugfix in der Ankopplung an OWServer
git-svn-id: https://svn.fhem.de/fhem/trunk@11216 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8ba6f9b5d9
commit
f990f8b8b3
@ -87,7 +87,7 @@ no warnings 'deprecated';
|
|||||||
|
|
||||||
sub Log($$);
|
sub Log($$);
|
||||||
|
|
||||||
my $owx_version="6.01";
|
my $owx_version="6.02";
|
||||||
#-- fixed raw channel name, flexible channel name
|
#-- fixed raw channel name, flexible channel name
|
||||||
my @owg_fixed = ("A","B","C","D","E","F","G","H");
|
my @owg_fixed = ("A","B","C","D","E","F","G","H");
|
||||||
my @owg_channel = ("A","B","C","D","E","F","G","H");
|
my @owg_channel = ("A","B","C","D","E","F","G","H");
|
||||||
@ -783,19 +783,16 @@ sub OWSWITCH_Set($@) {
|
|||||||
#-- OWFS interface
|
#-- OWFS interface
|
||||||
}elsif( $interface eq "OWServer" ){
|
}elsif( $interface eq "OWServer" ){
|
||||||
$ret1 = OWFSSWITCH_GetState($hash);
|
$ret1 = OWFSSWITCH_GetState($hash);
|
||||||
my $gpio = 0;
|
my $gpio = 0;
|
||||||
#--
|
|
||||||
for (my $i=0;$i<$cnumber{$attr{$name}{"model"}};$i++){
|
for (my $i=0;$i<$cnumber{$attr{$name}{"model"}};$i++){
|
||||||
if( $outval==0 ){
|
$gpio += ($hash->{owg_vax}->[$i]<<$i)
|
||||||
$gpio += ($hash->{owg_vax}->[$i]<<$i)
|
};
|
||||||
if( $i != $outfnd );
|
if( $outval==0 ){
|
||||||
}else{
|
$gpio &= ~(1<<$outfnd);
|
||||||
$gpio += ($hash->{owg_vax}->[$i]<<$i);
|
}else{
|
||||||
$gpio += (1<<$i)
|
$gpio |= (1<<$outfnd);
|
||||||
if( $i == $outfnd );
|
}
|
||||||
}
|
$ret2 = OWFSSWITCH_SetState($hash,$gpio);
|
||||||
}
|
|
||||||
$ret2 = OWFSSWITCH_SetState($hash,$value);
|
|
||||||
#-- Unknown interface
|
#-- Unknown interface
|
||||||
}else{
|
}else{
|
||||||
return "OWSWITCH: Get with wrong IODev type $interface";
|
return "OWSWITCH: Get with wrong IODev type $interface";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user