CUL_MAX: use culfw's auto-ack
git-svn-id: https://svn.fhem.de/fhem/trunk@2481 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -69,7 +69,11 @@ CUL_MAX_Define($$)
|
|||||||
$hash->{retryCount} = 0;
|
$hash->{retryCount} = 0;
|
||||||
$hash->{devices} = ();
|
$hash->{devices} = ();
|
||||||
AssignIoPort($hash);
|
AssignIoPort($hash);
|
||||||
CUL_MAX_Check($hash);
|
|
||||||
|
if(CUL_MAX_Check($hash)) {
|
||||||
|
#Doing this on older firmware disables MAX mode
|
||||||
|
IOWrite($hash, "", "Za". $hash->{addr});
|
||||||
|
}
|
||||||
|
|
||||||
#This interface is shared with 00_MAXLAN.pm
|
#This interface is shared with 00_MAXLAN.pm
|
||||||
$hash->{SendDeviceCmd} = \&CUL_MAX_SendDeviceCmd;
|
$hash->{SendDeviceCmd} = \&CUL_MAX_SendDeviceCmd;
|
||||||
@@ -109,9 +113,11 @@ CUL_MAX_Check($@)
|
|||||||
#Looks like "V 1.49 CUL868"
|
#Looks like "V 1.49 CUL868"
|
||||||
$version =~ m/V (.*)\.(.*) CUL.*/;
|
$version =~ m/V (.*)\.(.*) CUL.*/;
|
||||||
my ($major_version,$minorversion) = ($1, $2);
|
my ($major_version,$minorversion) = ($1, $2);
|
||||||
if($major_version == 1 and $minorversion < 50) {
|
if($major_version == 1 and $minorversion < 52) {
|
||||||
Log 2, "The current firmware of the CUL has known bugs with respect to MAX! support. Please update."
|
Log 2, "The current firmware of the CUL has known bugs with respect to MAX! support. Please update.";
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
sub
|
sub
|
||||||
@@ -170,6 +176,7 @@ CUL_MAX_Parse($$)
|
|||||||
if(exists($msgId2Cmd{$msgTypeRaw})) {
|
if(exists($msgId2Cmd{$msgTypeRaw})) {
|
||||||
|
|
||||||
if($msgType eq "Ack") {
|
if($msgType eq "Ack") {
|
||||||
|
return undef if($src eq $shash->{addr}); #Ignore packets generated by culfw's auto-Ack
|
||||||
Dispatch($shash, "MAX,$isToMe,Ack,$src,$payload", {RAWMSG => $rmsg});
|
Dispatch($shash, "MAX,$isToMe,Ack,$src,$payload", {RAWMSG => $rmsg});
|
||||||
|
|
||||||
return undef if(!$isToMe);
|
return undef if(!$isToMe);
|
||||||
|
|||||||
Reference in New Issue
Block a user