mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-10 09:16:53 +00:00
10_ZWave.pm: move timeToAck to the readings.
git-svn-id: https://svn.fhem.de/fhem/trunk@11760 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
56265292f9
commit
d724c43b70
@ -3610,7 +3610,8 @@ ZWave_processSendStack($$;$)
|
|||||||
my ($hash,$ackType, $omsg) = @_;
|
my ($hash,$ackType, $omsg) = @_;
|
||||||
my $ss = $hash->{SendStack};
|
my $ss = $hash->{SendStack};
|
||||||
if(!$ss) {
|
if(!$ss) {
|
||||||
$hash->{timeToAck} = sprintf("%0.3f", gettimeofday()-$hash->{lastMsgSent})
|
readingsSingleUpdate($hash, "timeToAck",
|
||||||
|
sprintf("%0.3f", gettimeofday()-$hash->{lastMsgSent}), 0)
|
||||||
if($ackType eq "ack" && $hash->{lastMsgSent});
|
if($ackType eq "ack" && $hash->{lastMsgSent});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@ -3630,8 +3631,9 @@ 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})
|
readingsSingleUpdate($hash, "timeToAck",
|
||||||
if($hash->{lastMsgSent});
|
sprintf("%0.3f", $now-$hash->{lastMsgSent}), 0)
|
||||||
|
if($hash->{lastMsgSent});
|
||||||
if($stype eq "get") {
|
if($stype eq "get") {
|
||||||
$ss->[0] = "sentackget:$smsg$cbid";
|
$ss->[0] = "sentackget:$smsg$cbid";
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user