Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/ClusterM/flipperzero-firmware.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSkorpionm <85568270+Skorpionm@users.noreply.github.com>2021-09-15 18:24:19 +0300
committerGitHub <noreply@github.com>2021-09-15 18:24:19 +0300
commit8fd411097ec3cd96c5f744008d71529661eea732 (patch)
treeec84a27b360a5a1b372ed1c2ae941e143364e62b /applications/subghz/subghz_cli.c
parent72ca76097a9752cc539c22cb8961ee481939eac4 (diff)
[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 <alleteam@gmail.com>
Diffstat (limited to 'applications/subghz/subghz_cli.c')
-rw-r--r--applications/subghz/subghz_cli.c16
1 files changed, 8 insertions, 8 deletions
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 <furi.h>
#include <furi-hal.h>
#include <stream_buffer.h>
-#include <lib/subghz/protocols/subghz_protocol.h>
+#include <lib/subghz/subghz_parser.h>
#include <lib/subghz/protocols/subghz_protocol_common.h>
#include <lib/subghz/protocols/subghz_protocol_princeton.h>
@@ -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);
}