2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-04 23:46:35 +00:00

00_HMUARTLGW.pm: propagate verbose attribute to keepAlive-device

git-svn-id: https://svn.fhem.de/fhem/trunk@12177 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mgernoth 2016-09-19 18:53:04 +00:00
parent 86b6b6bfd4
commit f828abd792

View File

@ -211,6 +211,7 @@ sub HMUARTLGW_DoInit($)
};
$attr{$keepAlive->{NAME}}{room} = "hidden";
$attr{$keepAlive->{NAME}}{verbose} = AttrVal($name, "verbose", undef);
$defs{$keepAlive->{NAME}} = $keepAlive;
DevIo_CloseDev($keepAlive);
@ -1817,6 +1818,14 @@ sub HMUARTLGW_Attr(@)
delete $attr{$name}{$aName};
delete $hash->{Helper}{Log};
}
} elsif ($aName eq "verbose") {
if ($hash->{keepAlive}) {
if ($cmd eq "set") {
$attr{$hash->{keepAlive}->{NAME}}{$aName} = $aVal;
} else {
delete $attr{$hash->{keepAlive}->{NAME}}{$aName};
}
}
}
return $retVal;
@ -2068,7 +2077,7 @@ sub HMUARTLGW_sendAscii($$)
$hash->{CNT} = ($hash->{CNT} + 1) & 0xff;
DevIo_SimpleWrite($hash, $msg, 2);
DevIo_SimpleWrite($hash, $msg, ($hash->{crypto} && !($msg =~ m/^V/))? 0 : 2);
}
sub HMUARTLGW_crc16($;$)