From 8fd411097ec3cd96c5f744008d71529661eea732 Mon Sep 17 00:00:00 2001 From: Skorpionm <85568270+Skorpionm@users.noreply.github.com> Date: Wed, 15 Sep 2021 19:24:19 +0400 Subject: [FL-1758, FL-1790] SubGhz refactoring part 2, fix generation of a new GateTX serial (#696) * WidGet: fix name Multiline String Element * SubGhz: rename SubGhzProtocol to SubGhzParser and bring it up * SubGhz: a new way to navigate in receiver views * SubGhz: fix syntax * WedGet: add forwarding input type to wedget button callback, fix using a callback in an application * SubGhz: add assertions and status checks * SubGhz: fix syntax * [FL-1790] SubGhz: fix GateTX * SubGhz: add 434.42 MHz frequency support * SubGhz: rename type protocol, add decoder stage names * SubGhz: fix navigation through received signals when changing scenes * SubGhz: fix 2-fsk config Co-authored-by: Aleksandr Kutuzov --- applications/subghz/subghz_cli.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'applications/subghz/subghz_cli.c') diff --git a/applications/subghz/subghz_cli.c b/applications/subghz/subghz_cli.c index e5da483e..46149d4e 100644 --- a/applications/subghz/subghz_cli.c +++ b/applications/subghz/subghz_cli.c @@ -3,7 +3,7 @@ #include #include #include -#include +#include #include #include @@ -205,10 +205,10 @@ void subghz_cli_command_rx(Cli* cli, string_t args, void* context) { instance->stream = xStreamBufferCreate(sizeof(LevelDuration) * 1024, sizeof(LevelDuration)); furi_check(instance->stream); - SubGhzProtocol* protocol = subghz_protocol_alloc(); - subghz_protocol_load_keeloq_file(protocol, "/ext/subghz/keeloq_mfcodes"); - subghz_protocol_load_nice_flor_s_file(protocol, "/ext/subghz/nice_floor_s_rx"); - subghz_protocol_enable_dump_text(protocol, subghz_cli_command_rx_text_callback, instance); + SubGhzParser* parser = subghz_parser_alloc(); + subghz_parser_load_keeloq_file(parser, "/ext/subghz/keeloq_mfcodes"); + subghz_parser_load_nice_flor_s_file(parser, "/ext/subghz/nice_floor_s_rx"); + subghz_parser_enable_dump_text(parser, subghz_cli_command_rx_text_callback, instance); // Configure radio furi_hal_subghz_reset(); @@ -228,11 +228,11 @@ void subghz_cli_command_rx(Cli* cli, string_t args, void* context) { if(ret == sizeof(LevelDuration)) { if(level_duration_is_reset(level_duration)) { printf("."); - subghz_protocol_reset(protocol); + subghz_parser_reset(parser); } else { bool level = level_duration_get_level(level_duration); uint32_t duration = level_duration_get_duration(level_duration); - subghz_protocol_parse(protocol, level, duration); + subghz_parser_parse(parser, level, duration); } } } @@ -244,7 +244,7 @@ void subghz_cli_command_rx(Cli* cli, string_t args, void* context) { printf("\r\nPackets recieved %u\r\n", instance->packet_count); // Cleanup - subghz_protocol_free(protocol); + subghz_parser_free(parser); vStreamBufferDelete(instance->stream); free(instance); } -- cgit v1.2.3