MAXLAN: ignore invalid data (which the cube sends after a reset)

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@2162 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
mgehre
2012-11-23 07:32:32 +00:00
parent 66acb7130c
commit f45bed1495

View File

@@ -499,6 +499,7 @@ MAXLAN_Parse($$)
Log 5, "bindata: ".unpack("H*",substr($bindata,0,$len+1)); #+1 because the len field is not counted
Log 5, "len $len, addr $addr, initialized $initialized, valid $valid, rferror $rferror1, errframetype $errframetype, unkbit ($unkbit1,$unkbit2,$unkbit3,$unkbit4)";
if($valid) {
my $shash = $modules{MAX}{defptr}{$addr};
if(!$shash) {
@@ -532,8 +533,9 @@ MAXLAN_Parse($$)
}else{
Log 2, "Got status for unimplemented device type $shash->{type}";
}
} # if($valid)
$bindata=substr($bindata,$len+1); #+1 because the len field is not counted
}
} # while(length($bindata))
if(!$hash->{gothello}) {
# "L:..." is the last response after connection before the cube starts to idle