mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-04-24 03:29:57 -07:00
Fix counter
This commit is contained in:
@@ -286,7 +286,11 @@ static bool subghz_protocol_alutech_at_4n_gen_data(
|
||||
}
|
||||
|
||||
if(instance->generic.cnt < 0xFFFF) {
|
||||
instance->generic.cnt += furi_hal_subghz_get_rolling_counter_mult();
|
||||
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();
|
||||
}
|
||||
} else if(instance->generic.cnt >= 0xFFFF) {
|
||||
instance->generic.cnt = 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user