mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-03 16:56:54 +00:00
prevent some undefined variable errors
git-svn-id: https://svn.fhem.de/fhem/trunk@4203 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
70d689b695
commit
29a864fff5
@ -105,6 +105,7 @@ sub HMLAN_Define($$) {#########################################################
|
||||
$hash->{DeviceName} = $dev;
|
||||
$hash->{msgKeepAlive} = ""; # delay of trigger Alive messages
|
||||
$hash->{helper}{k}{DlyMax} = 0;
|
||||
$hash->{helper}{k}{BufMin} = 30;
|
||||
|
||||
$hash->{helper}{q}{answerPend} = 0;#pending answers from LANIf
|
||||
my @arr = ();
|
||||
@ -491,15 +492,6 @@ sub HMLAN_Parse($$) {##########################################################
|
||||
if ($stat & 0x03 && $dst eq $attr{$name}{hmId}){HMLAN_qResp($hash,$src,0);}
|
||||
elsif ($stat & 0x08 && $src eq $attr{$name}{hmId}){HMLAN_qResp($hash,$dst,0);}
|
||||
|
||||
# HMLAN_UpdtMsgLoad($name,(($stat & 0x09)?(($stat & 0x08)?2 #2 repetitions
|
||||
# :1)#one ack
|
||||
# :0) #no ack
|
||||
# *((hex($flg)&0x10)?17 #burst=17units
|
||||
# :1)); #ACK=1 unit
|
||||
# HMLAN_UpdtMsgLoad($name,(($stat & 0x08)?2 #2 repetitions
|
||||
# :0) #one ack
|
||||
# *((hex($flg)&0x10)?17 #burst=17units
|
||||
# :1)); #ACK=1 unit
|
||||
HMLAN_UpdtMsgLoad($name,((hex($flg)&0x10)?34 #burst=17units *2
|
||||
:2)) #ACK=1 unit *2
|
||||
if (($stat & 0x48) == 8);# reject - but not from repeater
|
||||
|
@ -1591,6 +1591,7 @@ sub CUL_HM_parseCommon(@){#####################################################
|
||||
}
|
||||
|
||||
if ($subType =~ m/^8/){#NACK
|
||||
#84 : request undefined register
|
||||
$success = "no";
|
||||
CUL_HM_eventP($shash,"Nack");
|
||||
$reply = "NACK";
|
||||
@ -3214,7 +3215,7 @@ sub CUL_HM_valvePosUpdt(@) {#update valve position periodically to please valve
|
||||
|
||||
# if ($updtValveCnt++ %2){
|
||||
# $nextTimer = 20;
|
||||
# CUL_HM_PushCmdStack($hash,"++8670".$vDevId."00000000D036");# some weather event -
|
||||
# CUL_HM_PushCmdStack($hash,"++8670".$vDevId."00000000D036");# some weather event -
|
||||
# }
|
||||
# else{
|
||||
my $name = $hash->{NAME};
|
||||
@ -3957,6 +3958,8 @@ sub CUL_HM_IOid($) {#in: hash out: id of IO device
|
||||
my $dHash = CUL_HM_getDeviceHash($hash);
|
||||
my $ioHash = $dHash->{IODev};
|
||||
my $fhtid = defined($ioHash->{FHTID}) ? $ioHash->{FHTID} : "0000";
|
||||
return "" if (!$ioHash->{NAME});
|
||||
return AttrVal($ioHash->{NAME},"hmId","F1$fhtid");
|
||||
return $attr{$ioHash->{NAME}}{hmId}?$attr{$ioHash->{NAME}}{hmId}:"F1$fhtid";
|
||||
}
|
||||
sub CUL_HM_hash2Id($) {#in: id, out:hash
|
||||
@ -4918,13 +4921,15 @@ sub CUL_HM_procQs($){#process non-wakeup queues
|
||||
if (@{$mq->{$q}}){
|
||||
my $devN = ${$mq->{$q}}[0];
|
||||
my $ioName = $defs{$devN}{IODev}{NAME};
|
||||
if ( ( ReadingsVal($ioName,"cond","") =~ m /^(ok|Overload-released|init)$/
|
||||
if ( ( $ioName
|
||||
&& ReadingsVal($ioName,"cond","") =~ m /^(ok|Overload-released|init)$/
|
||||
&& $q eq "qReqStat")
|
||||
||( CUL_HM_autoReadReady($ioName)
|
||||
&& $q eq "qReqConf")){
|
||||
my $dq = $defs{$devN}{helper}{q};
|
||||
my @chns = split(",",$dq->{$q});
|
||||
if (@chns > 1){$dq->{$q} = join ",",@chns[1..@chns];}
|
||||
my $nOpen = scalar @chns;
|
||||
if (@chns > 1){$dq->{$q} = join ",",@chns[1..$nOpen-1];}
|
||||
else{ $dq->{$q} = "";
|
||||
@{$mq->{$q}} = grep !/^$devN$/,@{$mq->{$q}};
|
||||
}
|
||||
@ -4986,7 +4991,7 @@ sub CUL_HM_appFromQ($$){#stack commands if pend in WuQ
|
||||
if ($dq->{$q} ne ""){# need update
|
||||
my @chns = split(",",$dq->{$q});
|
||||
my $nOpen = scalar @chns;
|
||||
if ($nOpen > 1){$dq->{$q} = join ",",@chns[1..$nOpen];}
|
||||
if ($nOpen > 1){$dq->{$q} = join ",",@chns[1..$nOpen-1];}
|
||||
else{ $dq->{$q} = "";
|
||||
@{$modules{CUL_HM}{helper}{$q."Wu"}} =
|
||||
grep !/^$devN$/,@{$modules{CUL_HM}{helper}{$q."Wu"}};
|
||||
@ -5006,7 +5011,8 @@ sub CUL_HM_autoReadReady($){# capacity for autoread available?
|
||||
&& $defs{$mHlp->{autoRdActive}}){
|
||||
return 0 if ($defs{$mHlp->{autoRdActive}}{helper}{prt}{sProc} == 1); # predecessor still on
|
||||
}
|
||||
if ( ReadingsVal($ioName,"cond","") !~ m /^(ok|Overload-released|init)$/
|
||||
if ( !$ioName
|
||||
|| ReadingsVal($ioName,"cond","") !~ m /^(ok|Overload-released|init)$/
|
||||
|| ( $defs{$ioName}{helper}{q}
|
||||
&& ($defs{$ioName}{helper}{q}{cap}{sum}/16.8)>
|
||||
AttrVal($ioName,"hmMsgLowLimit",40))){
|
||||
|
@ -696,7 +696,7 @@ sub HMinfo_status($){##########################################################
|
||||
}
|
||||
if ($ehash->{helper}{role}{dev}){#---restrict to devices
|
||||
$nbrD++;
|
||||
push @IOdev,$ehash->{IODev}{NAME} if($ehash->{IODev});
|
||||
push @IOdev,$ehash->{IODev}{NAME} if($ehash->{IODev} && $ehash->{IODev}{NAME});
|
||||
push @Anames,$eName if ($attr{$eName}{actStatus} && $attr{$eName}{actStatus} ne "alive");
|
||||
foreach (grep {$ehash->{"prot".$_}} keys %protE){#protocol events reported
|
||||
$protE{$_}++;
|
||||
|
@ -2131,7 +2131,9 @@ CommandSetstate($$)
|
||||
next;
|
||||
}
|
||||
|
||||
if(!$d->{READINGS}{$sname} || $d->{READINGS}{$sname}{TIME} lt $tim) {
|
||||
if( !$d->{READINGS}{$sname}
|
||||
|| !$d->{READINGS}{$sname}{TIME} #General
|
||||
|| $d->{READINGS}{$sname}{TIME} lt $tim) {
|
||||
$d->{READINGS}{$sname}{VAL} = $sval;
|
||||
$d->{READINGS}{$sname}{TIME} = $tim;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user