SubGHz: Fix Came Atomo and NiceFlorS counters

add check for protocols with 16bit counters, to block them for going higher than 16bit
This commit is contained in:
MX
2022-11-26 17:23:36 +03:00
parent 513c352820
commit 08e533ccf2
2 changed files with 10 additions and 2 deletions

View File

@@ -135,7 +135,11 @@ static void
uint8_t pack[8] = {};
instance->generic.cnt++;
if(instance->generic.cnt < 0xFFFF) {
instance->generic.cnt++;
} else if(instance->generic.cnt >= 0xFFFF) {
instance->generic.cnt = 0;
}
//Send header
instance->encoder.upload[index++] =