mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-04 22:19:38 +00:00
00_ZWDongle.pm: another wakup change (Forum #37418)
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@8750 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
2ce148805b
commit
f505f35350
@ -511,22 +511,23 @@ ZWDongle_Write($$$)
|
|||||||
|
|
||||||
# push message on stack
|
# push message on stack
|
||||||
my $ss = $hash->{SendStack};
|
my $ss = $hash->{SendStack};
|
||||||
|
|
||||||
|
my $wNMIre = '01....13..028408';
|
||||||
|
if(@{$ss} && $ss->[0] =~ m/$wNMIre/) {
|
||||||
|
Log3 $hash, 2,
|
||||||
|
"ZWDongle_Write: command after wakeupNoMoreInformation dropped";
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
push @{$ss}, $msg;
|
push @{$ss}, $msg;
|
||||||
|
|
||||||
# assure that wakeupNoMoreInformation is the last message on the sendStack
|
# assure that wakeupNoMoreInformation is the last message on the sendStack
|
||||||
if($msg =~ m/^01....13(..)/) {
|
if($msg =~ m/^01....13(..)/) {
|
||||||
my $wNMIre = '01....13..028408';
|
|
||||||
|
|
||||||
if($ss->[0] =~ m/$wNMIre/) {
|
|
||||||
Log3 $hash, 2,
|
|
||||||
"ZWDongle_Write: command after wakeupNoMoreInformation dropped";
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
|
|
||||||
my $wNMI;
|
my $wNMI;
|
||||||
my @s = grep { /^$wNMIre/ ? ($wNMI=$_,0):1 } @{$ss};
|
my @s = grep { /^$wNMIre/ ? ($wNMI=$_,0):1 } @{$ss};
|
||||||
if($wNMI) {
|
if($wNMI) {
|
||||||
Log3 $hash, 5, "ZWDongle_Write wakeupNoMoreInformation moved to the end";
|
Log3 $hash, 5, "ZWDongle_Write wakeupNoMoreInformation moved to the end"
|
||||||
|
if($wNMI ne $msg);
|
||||||
push @s, $wNMI;
|
push @s, $wNMI;
|
||||||
$hash->{SendStack} = \@s;
|
$hash->{SendStack} = \@s;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user