mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-07 06:48:43 +00:00
10_ZWave.pm: add timeToAck (Forum #50090)
git-svn-id: https://svn.fhem.de/fhem/trunk@11111 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
47d69c9fef
commit
50373ba5eb
@ -3564,6 +3564,7 @@ ZWave_processSendStack($$;$)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
my $now = gettimeofday();
|
||||||
if($ss->[0] =~ m/^sent(.*?):(.*)(..)$/) {
|
if($ss->[0] =~ m/^sent(.*?):(.*)(..)$/) {
|
||||||
my ($stype,$smsg, $cbid) = ($1,$2,$3);
|
my ($stype,$smsg, $cbid) = ($1,$2,$3);
|
||||||
if($ackType eq "ack") {
|
if($ackType eq "ack") {
|
||||||
@ -3571,6 +3572,8 @@ ZWave_processSendStack($$;$)
|
|||||||
Log 4, "ZWave: wrong callbackid $omsg received, expecting $cbid";
|
Log 4, "ZWave: wrong callbackid $omsg received, expecting $cbid";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
$hash->{timeToAck} = sprintf("%0.3f", $now-$hash->{lastMsgSent})
|
||||||
|
if($hash->{lastMsgSent});
|
||||||
if($stype eq "get") {
|
if($stype eq "get") {
|
||||||
$ss->[0] = "sentackget:$smsg$cbid";
|
$ss->[0] = "sentackget:$smsg$cbid";
|
||||||
return;
|
return;
|
||||||
@ -3598,7 +3601,7 @@ ZWave_processSendStack($$;$)
|
|||||||
"00$msg");
|
"00$msg");
|
||||||
$ss->[0] = "sent$type:$msg";
|
$ss->[0] = "sent$type:$msg";
|
||||||
|
|
||||||
$hash->{lastMsgSent} = gettimeofday();
|
$hash->{lastMsgSent} = $now;
|
||||||
$zwave_lastHashSent = $hash;
|
$zwave_lastHashSent = $hash;
|
||||||
|
|
||||||
if(!ZWave_isWakeUp($hash)) {
|
if(!ZWave_isWakeUp($hash)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user