Check the CUL id for 8v collision
git-svn-id: https://svn.fhem.de/fhem/trunk@740 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
@@ -324,12 +324,25 @@ FHT_Define($$)
|
||||
|
||||
|
||||
$hash->{CODE} = $a[2];
|
||||
$hash->{CODE} = $a[2];
|
||||
AssignIoPort($hash);
|
||||
|
||||
# Check if the CULs id collides with our id.
|
||||
if($hash->{IODev} && $hash->{IODev}{TYPE} eq "CUL") {
|
||||
$hash->{IODev}{FHTID} =~ m/^(..)(..)$/;
|
||||
my ($i1, $i2) = (hex($1), hex($2));
|
||||
$a[2] =~ m/^(..)(..)$/;
|
||||
my ($l1, $l2) = (hex($1), hex($2));
|
||||
|
||||
if($l2 == $i2 && $l1 >= $i1 && $l1 <= $i1+7) {
|
||||
my $err = "$a[0]: CODE collides with the FHTID of the corresponding CUL";
|
||||
Log 1, $err;
|
||||
return $err;
|
||||
}
|
||||
}
|
||||
|
||||
$modules{FHT}{defptr}{$a[2]} = $hash;
|
||||
$attr{$a[0]}{retrycount} = 3;
|
||||
|
||||
AssignIoPort($hash);
|
||||
|
||||
#Log GetLogLevel($a[0],2),"Asking the FHT device $a[0]/$a[2] to send its data";
|
||||
#FHT_Set($hash, ($a[0], "report1", "255", "report2", "255"));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user