From ed7db336c1ce537ee86af5df6b9512299e323db8 Mon Sep 17 00:00:00 2001 From: Skorpionm <85568270+Skorpionm@users.noreply.github.com> Date: Tue, 26 Jul 2022 16:58:07 +0400 Subject: [PATCH] [FL-2684, FL-2685] bugfix subghz (#1446) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [FL-2684] SubGhz: fix incorrect CAME TWICE protocol definition * [FL-2685] SubGhz: fix the recorded RAW signal is deleted when trying to transmit on a prohibited frequency Co-authored-by: あく --- applications/subghz/scenes/subghz_scene_read_raw.c | 1 + lib/subghz/protocols/came_twee.c | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/applications/subghz/scenes/subghz_scene_read_raw.c b/applications/subghz/scenes/subghz_scene_read_raw.c index 598f235e3..3552d0446 100644 --- a/applications/subghz/scenes/subghz_scene_read_raw.c +++ b/applications/subghz/scenes/subghz_scene_read_raw.c @@ -202,6 +202,7 @@ bool subghz_scene_read_raw_on_event(void* context, SceneManagerEvent event) { if((subghz->txrx->txrx_state == SubGhzTxRxStateIDLE) || (subghz->txrx->txrx_state == SubGhzTxRxStateSleep)) { if(!subghz_tx_start(subghz, subghz->txrx->fff_data)) { + subghz->txrx->rx_key_state = SubGhzRxKeyStateBack; scene_manager_next_scene(subghz->scene_manager, SubGhzSceneShowOnlyRx); } else { DOLPHIN_DEED(DolphinDeedSubGhzSend); diff --git a/lib/subghz/protocols/came_twee.c b/lib/subghz/protocols/came_twee.c index 1b60e1119..fa538c545 100644 --- a/lib/subghz/protocols/came_twee.c +++ b/lib/subghz/protocols/came_twee.c @@ -354,7 +354,7 @@ void subghz_protocol_decoder_came_twee_feed(void* context, bool level, uint32_t } else if( duration >= ((uint32_t)subghz_protocol_came_twee_const.te_long * 2 + subghz_protocol_came_twee_const.te_delta)) { - if(instance->decoder.decode_count_bit >= + if(instance->decoder.decode_count_bit == subghz_protocol_came_twee_const.min_count_bit_for_found) { instance->generic.data = instance->decoder.decode_data; instance->generic.data_count_bit = instance->decoder.decode_count_bit;