mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-10 06:54:19 +00:00
use global counter
This commit is contained in:
parent
80a555a232
commit
ad1c9045af
1 changed files with 2 additions and 2 deletions
|
@ -146,10 +146,10 @@ static void subghz_protocol_encoder_hay21_get_upload(SubGhzProtocolEncoderHay21*
|
||||||
|
|
||||||
// Counter increment
|
// Counter increment
|
||||||
if(instance->generic.cnt < 0xF) {
|
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;
|
instance->generic.cnt = 0;
|
||||||
} else {
|
} else {
|
||||||
instance->generic.cnt++;
|
instance->generic.cnt += furi_hal_subghz_get_rolling_counter_mult();
|
||||||
}
|
}
|
||||||
} else if(instance->generic.cnt >= 0xF) {
|
} else if(instance->generic.cnt >= 0xF) {
|
||||||
instance->generic.cnt = 0;
|
instance->generic.cnt = 0;
|
||||||
|
|
Loading…
Reference in a new issue