mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
read additional config files
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@5547 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
8229e2709d
commit
258833574a
@ -5547,13 +5547,23 @@ sub CUL_HM_getChnLvl($){# in: name out: vit or phys level
|
|||||||
|
|
||||||
#--------------- Conversion routines for register settings---------------------
|
#--------------- Conversion routines for register settings---------------------
|
||||||
sub CUL_HM_initRegHash() { #duplicate short and long press register
|
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
|
foreach my $reg (keys %{$culHmRegDefShLg}){ #update register list
|
||||||
%{$culHmRegDefine->{"sh".$reg}} = %{$culHmRegDefShLg->{$reg}};
|
%{$culHmRegDefine->{"sh".$reg}} = %{$culHmRegDefShLg->{$reg}};
|
||||||
%{$culHmRegDefine->{"lg".$reg}} = %{$culHmRegDefShLg->{$reg}};
|
%{$culHmRegDefine->{"lg".$reg}} = %{$culHmRegDefShLg->{$reg}};
|
||||||
$culHmRegDefine->{"lg".$reg}{a} +=0x80;
|
$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
|
if ($culHmRegDefine->{$rN}{lit}){# literal assigned => create inverse
|
||||||
foreach my $lit (keys %{$culHmRegDefine->{$rN}{lit}}){
|
foreach my $lit (keys %{$culHmRegDefine->{$rN}{lit}}){
|
||||||
$culHmRegDefine->{$rN}{litInv}{$culHmRegDefine->{$rN}{lit}{$lit}}=$lit;
|
$culHmRegDefine->{$rN}{litInv}{$culHmRegDefine->{$rN}{lit}{$lit}}=$lit;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user