mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
10_SOMFY: FIX: hex value warning for rollcode / empty ioTypes
git-svn-id: https://svn.fhem.de/fhem/trunk@21792 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
36f5c6cc04
commit
4fc08d0805
@ -76,6 +76,10 @@
|
|||||||
# - new attr autoStoreRollingCode - store rc in uniqueID
|
# - new attr autoStoreRollingCode - store rc in uniqueID
|
||||||
# - store rolling code in uniqueid based on addr
|
# - store rolling code in uniqueid based on addr
|
||||||
# - ensure largest rollingcode (either reading or unqieid is used)
|
# - ensure largest rollingcode (either reading or unqieid is used)
|
||||||
|
# - FIX: hex value warning for rollcode
|
||||||
|
# - FIX: allow empty ioTypes for testing
|
||||||
|
#
|
||||||
|
#
|
||||||
#
|
#
|
||||||
###############################################################################
|
###############################################################################
|
||||||
#
|
#
|
||||||
@ -1068,7 +1072,10 @@ sub SOMFY_getRollCode($)
|
|||||||
if ( AttrVal( $name, "autoStoreRollingCode", 0 ) ) {
|
if ( AttrVal( $name, "autoStoreRollingCode", 0 ) ) {
|
||||||
my $storeRC = uc( SOMFY_readRollCode( $hash ) );
|
my $storeRC = uc( SOMFY_readRollCode( $hash ) );
|
||||||
$storeRC = "0000" if ( $storeRC !~ /[0-9a-f]{4}/ );
|
$storeRC = "0000" if ( $storeRC !~ /[0-9a-f]{4}/ );
|
||||||
if ( $storeRC > $rollingcode ) {
|
my $storeDec = hex( $storeRC );
|
||||||
|
my $rollDec = hex( $rollingcode );
|
||||||
|
|
||||||
|
if ( $storeDec > $rollDec ) {
|
||||||
$rollingcode = $storeRC;
|
$rollingcode = $storeRC;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1591,6 +1598,7 @@ sub SOMFY_SendCommand($@)
|
|||||||
|
|
||||||
my $io = $hash->{IODev};
|
my $io = $hash->{IODev};
|
||||||
my $ioType = $io->{TYPE};
|
my $ioType = $io->{TYPE};
|
||||||
|
$ioType = "" if ( ! defined( $ioType ) );
|
||||||
|
|
||||||
return $ret if(IsIgnored($name));
|
return $ret if(IsIgnored($name));
|
||||||
return $ret if(IsDisabled($name));
|
return $ret if(IsDisabled($name));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user