2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

70_PylonLowVoltage: contrib V0.1.3

git-svn-id: https://svn.fhem.de/fhem/trunk@27881 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
nasseeder1 2023-08-23 09:39:10 +00:00
parent b5ea98ef25
commit a1dc4ad443

View File

@ -983,18 +983,18 @@ sub Reread {
my $socket = shift;
my $singlechar;
my $res = q{};
my $res = q{};
do {
do {
$socket->read ($singlechar, 1);
if (!$singlechar && (0+$! == ETIMEDOUT || 0+$! == EWOULDBLOCK)) { # nur notwendig für read timeout
croak 'Timeout reading data from battery';
}
$res = $res . $singlechar;
$res = $res . $singlechar if(length $singlechar != 0 && $singlechar =~ /[~A-Z0-9\r]+/xs);
} while (ord($singlechar) != 13);
} while (length $singlechar == 0 || ord($singlechar) != 13);
return $res;
}