1
mirror of https://github.com/DarkFlippers/unleashed-firmware.git synced 2025-12-12 04:34:43 +04:00

fix 0xFFFF counter value being skipped

This commit is contained in:
MX
2023-08-23 23:40:13 +03:00
parent 52654d018e
commit b5426197f5
8 changed files with 8 additions and 8 deletions

View File

@@ -156,7 +156,7 @@ static bool subghz_protocol_kinggates_stylo_4k_gen_data(
instance->generic.cnt = decrypt & 0xFFFF;
if(instance->generic.cnt < 0xFFFF) {
if((instance->generic.cnt + furi_hal_subghz_get_rolling_counter_mult()) >= 0xFFFF) {
if((instance->generic.cnt + furi_hal_subghz_get_rolling_counter_mult()) > 0xFFFF) {
instance->generic.cnt = 0;
} else {
instance->generic.cnt += furi_hal_subghz_get_rolling_counter_mult();