mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
00_CUL.pm: init patch by gero (Forum #37672)
git-svn-id: https://svn.fhem.de/fhem/trunk@8679 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
83feb07496
commit
86c526a647
@ -419,10 +419,11 @@ CUL_Clear($)
|
||||
# Clear the pipe
|
||||
$hash->{RA_Timeout} = 0.1;
|
||||
for(;;) {
|
||||
my ($err, undef) = CUL_ReadAnswer($hash, "Clear", 0, undef);
|
||||
my ($err, undef) = CUL_ReadAnswer($hash, "Clear", 0, "wontmatch");
|
||||
last if($err);
|
||||
}
|
||||
delete($hash->{RA_Timeout});
|
||||
$hash->{PARTIAL} = "";
|
||||
}
|
||||
|
||||
#####################################
|
||||
@ -438,7 +439,7 @@ CUL_DoInit($)
|
||||
my ($ver, $try) = ("", 0);
|
||||
while($try++ < 3 && $ver !~ m/^V/) {
|
||||
CUL_SimpleWrite($hash, "V");
|
||||
($err, $ver) = CUL_ReadAnswer($hash, "Version", 0, undef);
|
||||
($err, $ver) = CUL_ReadAnswer($hash, "Version", 0, "^V");
|
||||
return "$name: $err" if($err && ($err !~ m/Timeout/ || $try == 3));
|
||||
$ver = "" if(!$ver);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user