From 1e431422e7d3baed4a2dd0dbd8733e6978024d23 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Sun, 28 Sep 2025 02:11:06 +0300 Subject: [PATCH] smol fixes [ci skip] --- applications/main/subghz/helpers/subghz_gen_info.c | 1 + lib/subghz/protocols/gangqi.c | 8 ++------ 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/applications/main/subghz/helpers/subghz_gen_info.c b/applications/main/subghz/helpers/subghz_gen_info.c index 69fa37187..459f600ca 100644 --- a/applications/main/subghz/helpers/subghz_gen_info.c +++ b/applications/main/subghz/helpers/subghz_gen_info.c @@ -1,6 +1,7 @@ #include "subghz_gen_info.h" #include "../helpers/subghz_txrx_create_protocol_key.h" #include +#include void subghz_gen_info_reset(GenInfo* gen_info) { furi_assert(gen_info); diff --git a/lib/subghz/protocols/gangqi.c b/lib/subghz/protocols/gangqi.c index 905c22982..a079a41bd 100644 --- a/lib/subghz/protocols/gangqi.c +++ b/lib/subghz/protocols/gangqi.c @@ -363,19 +363,15 @@ void subghz_protocol_decoder_gangqi_feed(void* context, bool level, volatile uin instance->decoder.parser_step = GangQiDecoderStepSaveDuration; } else if( // End of the key - DURATION_DIFF(duration, subghz_protocol_gangqi_const.te_short * 4) < - subghz_protocol_gangqi_const.te_delta) { + (DURATION_DIFF(duration, subghz_protocol_gangqi_const.te_long * 2) < + subghz_protocol_gangqi_const.te_delta * 3)) { //Found next GAP and add bit 0 or 1 (only bit 0 was found on the remotes) if((DURATION_DIFF( instance->decoder.te_last, subghz_protocol_gangqi_const.te_short) < - subghz_protocol_gangqi_const.te_delta) && - (DURATION_DIFF(duration, subghz_protocol_gangqi_const.te_short * 4) < subghz_protocol_gangqi_const.te_delta)) { subghz_protocol_blocks_add_bit(&instance->decoder, 0); } if((DURATION_DIFF(instance->decoder.te_last, subghz_protocol_gangqi_const.te_long) < - subghz_protocol_gangqi_const.te_delta) && - (DURATION_DIFF(duration, subghz_protocol_gangqi_const.te_short * 4) < subghz_protocol_gangqi_const.te_delta)) { subghz_protocol_blocks_add_bit(&instance->decoder, 1); }