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:
herrmannj
2020-09-19 13:54:36 +00:00
parent 9e2bfe30ef
commit bab51b203c

View File

@@ -162,7 +162,7 @@ sub SchellenbergHandle_ProcessMsg {
if ($mt eq '1') {
# message counter > last known ?
$mc = hex($mc);
my $lastmc = $hash->{'.MC'} // hex($mc) -1;
my $lastmc = $hash->{'.MC'} // $mc -1;
my $diff;
{
use integer;
@@ -174,7 +174,7 @@ sub SchellenbergHandle_ProcessMsg {
#$hash->{'MISSED_PACKET'} += $lc;
readingsBeginUpdate($hash);
#readingsBulkUpdate($hash, '.mc', hex($mc));
$hash->{'.MC'} = hex($mc);
$hash->{'.MC'} = $mc;
readingsBulkUpdateIfChanged($hash, 'state', statefn($fn));
readingsBulkUpdateIfChanged($hash, 'alive', 'ok');
readingsBulkUpdate($hash, 'rssi', $rssi);