Skip to content

Commit

Permalink
use global counter
Browse files Browse the repository at this point in the history
  • Loading branch information
xMasterX committed Sep 6, 2024
1 parent 80a555a commit ad1c904
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/subghz/protocols/hay21.c
Original file line number Diff line number Diff line change
Expand Up @@ -146,10 +146,10 @@ static void subghz_protocol_encoder_hay21_get_upload(SubGhzProtocolEncoderHay21*

// Counter increment
if(instance->generic.cnt < 0xF) {
if((instance->generic.cnt + 0x1) > 0xF) {
if((instance->generic.cnt + furi_hal_subghz_get_rolling_counter_mult()) > 0xF) {
instance->generic.cnt = 0;
} else {
instance->generic.cnt++;
instance->generic.cnt += furi_hal_subghz_get_rolling_counter_mult();
}
} else if(instance->generic.cnt >= 0xF) {
instance->generic.cnt = 0;
Expand Down

0 comments on commit ad1c904

Please sign in to comment.