mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
10_SchellenbergHandle.pm: rolling code fix #2
git-svn-id: https://svn.fhem.de/fhem/trunk@22793 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
b0483010d4
commit
ff7b4aca96
@ -162,7 +162,7 @@ sub SchellenbergHandle_ProcessMsg {
|
|||||||
if ($mt eq '1') {
|
if ($mt eq '1') {
|
||||||
# message counter > last known ?
|
# message counter > last known ?
|
||||||
$mc = hex($mc);
|
$mc = hex($mc);
|
||||||
my $lastmc = $hash->{'.MC'} // hex($mc) -1;
|
my $lastmc = $hash->{'.MC'} // $mc -1;
|
||||||
my $diff;
|
my $diff;
|
||||||
{
|
{
|
||||||
use integer;
|
use integer;
|
||||||
@ -174,7 +174,7 @@ sub SchellenbergHandle_ProcessMsg {
|
|||||||
#$hash->{'MISSED_PACKET'} += $lc;
|
#$hash->{'MISSED_PACKET'} += $lc;
|
||||||
readingsBeginUpdate($hash);
|
readingsBeginUpdate($hash);
|
||||||
#readingsBulkUpdate($hash, '.mc', hex($mc));
|
#readingsBulkUpdate($hash, '.mc', hex($mc));
|
||||||
$hash->{'.MC'} = hex($mc);
|
$hash->{'.MC'} = $mc;
|
||||||
readingsBulkUpdateIfChanged($hash, 'state', statefn($fn));
|
readingsBulkUpdateIfChanged($hash, 'state', statefn($fn));
|
||||||
readingsBulkUpdateIfChanged($hash, 'alive', 'ok');
|
readingsBulkUpdateIfChanged($hash, 'alive', 'ok');
|
||||||
readingsBulkUpdate($hash, 'rssi', $rssi);
|
readingsBulkUpdate($hash, 'rssi', $rssi);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user