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

smol fixes [ci skip]

This commit is contained in:
MX
2025-09-28 02:11:06 +03:00
parent 2dd6b5cdce
commit 1e431422e7
2 changed files with 3 additions and 6 deletions

View File

@@ -1,6 +1,7 @@
#include "subghz_gen_info.h" #include "subghz_gen_info.h"
#include "../helpers/subghz_txrx_create_protocol_key.h" #include "../helpers/subghz_txrx_create_protocol_key.h"
#include <lib/subghz/protocols/protocol_items.h> #include <lib/subghz/protocols/protocol_items.h>
#include <lib/subghz/blocks/math.h>
void subghz_gen_info_reset(GenInfo* gen_info) { void subghz_gen_info_reset(GenInfo* gen_info) {
furi_assert(gen_info); furi_assert(gen_info);

View File

@@ -363,19 +363,15 @@ void subghz_protocol_decoder_gangqi_feed(void* context, bool level, volatile uin
instance->decoder.parser_step = GangQiDecoderStepSaveDuration; instance->decoder.parser_step = GangQiDecoderStepSaveDuration;
} else if( } else if(
// End of the key // End of the key
DURATION_DIFF(duration, subghz_protocol_gangqi_const.te_short * 4) < (DURATION_DIFF(duration, subghz_protocol_gangqi_const.te_long * 2) <
subghz_protocol_gangqi_const.te_delta) { subghz_protocol_gangqi_const.te_delta * 3)) {
//Found next GAP and add bit 0 or 1 (only bit 0 was found on the remotes) //Found next GAP and add bit 0 or 1 (only bit 0 was found on the remotes)
if((DURATION_DIFF( if((DURATION_DIFF(
instance->decoder.te_last, subghz_protocol_gangqi_const.te_short) < 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_gangqi_const.te_delta)) {
subghz_protocol_blocks_add_bit(&instance->decoder, 0); subghz_protocol_blocks_add_bit(&instance->decoder, 0);
} }
if((DURATION_DIFF(instance->decoder.te_last, subghz_protocol_gangqi_const.te_long) < 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_gangqi_const.te_delta)) {
subghz_protocol_blocks_add_bit(&instance->decoder, 1); subghz_protocol_blocks_add_bit(&instance->decoder, 1);
} }