mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-02-01 01:09:47 +00:00
read additional config files
git-svn-id: https://svn.fhem.de/fhem/trunk@5547 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
ddfcc1ebd5
commit
1f9e0ae526
@ -5547,13 +5547,23 @@ sub CUL_HM_getChnLvl($){# in: name out: vit or phys level
|
||||
|
||||
#--------------- Conversion routines for register settings---------------------
|
||||
sub CUL_HM_initRegHash() { #duplicate short and long press register
|
||||
my $mp = "./FHEM";
|
||||
opendir(DH, $mp) || return;
|
||||
foreach my $m (grep /^HMConfig_(.*)\.pm$/,readdir(DH)) {
|
||||
my $file = "$mp$m";
|
||||
no strict "refs";
|
||||
my $ret = do $file;
|
||||
use strict "refs";
|
||||
Log3 undef, 1, "Error loading file: $file:\n $@" if(!$ret) ;
|
||||
}
|
||||
closedir(DH);
|
||||
|
||||
foreach my $reg (keys %{$culHmRegDefShLg}){ #update register list
|
||||
%{$culHmRegDefine->{"sh".$reg}} = %{$culHmRegDefShLg->{$reg}};
|
||||
%{$culHmRegDefine->{"lg".$reg}} = %{$culHmRegDefShLg->{$reg}};
|
||||
$culHmRegDefine->{"lg".$reg}{a} +=0x80;
|
||||
}
|
||||
foreach my $rN (keys %{$culHmRegDefine}){#create literal inverse for fast search
|
||||
foreach my $rN (keys %{$culHmRegDefine}){#create literal inverse for fast search
|
||||
if ($culHmRegDefine->{$rN}{lit}){# literal assigned => create inverse
|
||||
foreach my $lit (keys %{$culHmRegDefine->{$rN}{lit}}){
|
||||
$culHmRegDefine->{$rN}{litInv}{$culHmRegDefine->{$rN}{lit}{$lit}}=$lit;
|
||||
|
Loading…
Reference in New Issue
Block a user