00_HMUARTLGW.pm: improve support for old perl versions
git-svn-id: https://svn.fhem.de/fhem/trunk@12433 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -2069,8 +2069,10 @@ sub HMUARTLGW_sendAscii($$)
|
|||||||
|
|
||||||
$msg = sprintf($msg, $hash->{CNT});
|
$msg = sprintf($msg, $hash->{CNT});
|
||||||
|
|
||||||
|
my $logmsg = $msg;
|
||||||
|
$logmsg =~ s/\r\n$//;
|
||||||
Log3($hash, HMUARTLGW_getVerbLvl($hash, undef, undef, 5),
|
Log3($hash, HMUARTLGW_getVerbLvl($hash, undef, undef, 5),
|
||||||
"HMUARTLGW ${name} send (".length($msg)."): ". $msg =~ s/\r\n//r);
|
"HMUARTLGW ${name} send (".length($logmsg)."): ". $logmsg);
|
||||||
$msg = HMUARTLGW_encrypt($hash, $msg) if ($hash->{crypto} && !($msg =~ m/^V/));
|
$msg = HMUARTLGW_encrypt($hash, $msg) if ($hash->{crypto} && !($msg =~ m/^V/));
|
||||||
|
|
||||||
$hash->{CNT} = ($hash->{CNT} + 1) & 0xff;
|
$hash->{CNT} = ($hash->{CNT} + 1) & 0xff;
|
||||||
|
|||||||
Reference in New Issue
Block a user