mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 05:16:45 +00:00
git-svn-id: https://svn.fhem.de/fhem/trunk@10405 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
5137bc3f61
commit
16ea9c00d6
@ -2327,15 +2327,12 @@ sub
|
|||||||
ZWave_secStart($)
|
ZWave_secStart($)
|
||||||
{
|
{
|
||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
#~ Log3 $hash->{NAME}, 5, "$hash->{NAME}: secStart called";
|
|
||||||
|
|
||||||
my $dt = gettimeofday();
|
my $dt = gettimeofday();
|
||||||
$hash->{secTime} = $dt;
|
$hash->{secTime} = $dt;
|
||||||
InternalTimer($dt+7, "ZWave_secUnlock", $hash, 0);
|
InternalTimer($dt+7, "ZWave_secUnlock", $hash, 0);
|
||||||
#~ Log3 $hash->{NAME}, 5, "Timer for secUnlock set ($dt+7)";
|
|
||||||
|
|
||||||
return if($hash->{secInProgress});
|
return if($hash->{secInProgress});
|
||||||
#~ Log3 $hash->{NAME}, 5, "$hash->{NAME}: setting secInProgress";
|
|
||||||
$hash->{secInProgress} = 1;
|
$hash->{secInProgress} = 1;
|
||||||
my @empty;
|
my @empty;
|
||||||
$hash->{secStack} = \@empty;
|
$hash->{secStack} = \@empty;
|
||||||
@ -2345,10 +2342,10 @@ sub
|
|||||||
ZWave_secUnlock($)
|
ZWave_secUnlock($)
|
||||||
{
|
{
|
||||||
my ($hash)= @_;
|
my ($hash)= @_;
|
||||||
#~ Log3 $hash->{NAME}, 5, "secUnlock triggert";
|
|
||||||
my $dt = gettimeofday();
|
my $dt = gettimeofday();
|
||||||
if ($dt > ($hash->{secTime} + 6)) {
|
if (($hash->{secInProgress}) && ($dt > ($hash->{secTime} + 6))) {
|
||||||
Log3 $hash->{NAME}, 3, "secUnlock will call Zwave_secEnd";
|
Log3 $hash->{NAME}, 3, "secStart is older than 6 seconds, "
|
||||||
|
."secUnlock will call Zwave_secEnd";
|
||||||
ZWave_secEnd($hash);
|
ZWave_secEnd($hash);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -2357,9 +2354,8 @@ sub
|
|||||||
ZWave_secEnd($)
|
ZWave_secEnd($)
|
||||||
{
|
{
|
||||||
my ($hash) = @_;
|
my ($hash) = @_;
|
||||||
#~ Log3 $hash->{NAME}, 5, "$hash->{NAME}: secEnd called";
|
|
||||||
return if(!$hash->{secInProgress});
|
return if(!$hash->{secInProgress});
|
||||||
#~ Log3 $hash->{NAME}, 5, "$hash->{NAME}: secEnd removing secInProgress";
|
|
||||||
my $secStack = $hash->{secStack};
|
my $secStack = $hash->{secStack};
|
||||||
delete $hash->{secInProgress};
|
delete $hash->{secInProgress};
|
||||||
delete $hash->{secStack};
|
delete $hash->{secStack};
|
||||||
|
Loading…
x
Reference in New Issue
Block a user