diff options
author | Skorpionm <85568270+Skorpionm@users.noreply.github.com> | 2021-09-15 18:24:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-09-15 18:24:19 +0300 |
commit | 8fd411097ec3cd96c5f744008d71529661eea732 (patch) | |
tree | ec84a27b360a5a1b372ed1c2ae941e143364e62b /applications/subghz/subghz.c | |
parent | 72ca76097a9752cc539c22cb8961ee481939eac4 (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.c')
-rw-r--r-- | applications/subghz/subghz.c | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/applications/subghz/subghz.c b/applications/subghz/subghz.c index 5b356ab1..02da799d 100644 --- a/applications/subghz/subghz.c +++ b/applications/subghz/subghz.c @@ -7,6 +7,7 @@ const char* const subghz_frequencies_text[] = { "387.00", "433.08", "433.92", + "434.42", "434.78", "438.90", "464.00", @@ -26,6 +27,7 @@ const uint32_t subghz_frequencies[] = { 387000000, 433075000, /* LPD433 first */ 433920000, /* LPD433 mid */ + 434420000, 434775000, /* LPD433 last channels */ 438900000, 464000000, @@ -156,24 +158,24 @@ SubGhz* subghz_alloc() { subghz->txrx = furi_alloc(sizeof(SubGhzTxRx)); subghz->txrx->frequency = subghz_frequencies[subghz_frequencies_433_92]; subghz->txrx->preset = FuriHalSubGhzPresetOok650Async; - subghz->txrx->txrx_state = SubGhzTxRxStateIdle; + subghz->txrx->txrx_state = SubGhzTxRxStateSleep; subghz->txrx->hopper_state = SubGhzHopperStateOFF; subghz->txrx->history = subghz_history_alloc(); subghz->txrx->worker = subghz_worker_alloc(); - subghz->txrx->protocol = subghz_protocol_alloc(); + subghz->txrx->parser = subghz_parser_alloc(); subghz_worker_set_overrun_callback( - subghz->txrx->worker, (SubGhzWorkerOverrunCallback)subghz_protocol_reset); + subghz->txrx->worker, (SubGhzWorkerOverrunCallback)subghz_parser_reset); subghz_worker_set_pair_callback( - subghz->txrx->worker, (SubGhzWorkerPairCallback)subghz_protocol_parse); - subghz_worker_set_context(subghz->txrx->worker, subghz->txrx->protocol); + subghz->txrx->worker, (SubGhzWorkerPairCallback)subghz_parser_parse); + subghz_worker_set_context(subghz->txrx->worker, subghz->txrx->parser); //Init Error_str string_init(subghz->error_str); - subghz_protocol_load_keeloq_file(subghz->txrx->protocol, "/ext/subghz/keeloq_mfcodes"); - subghz_protocol_load_nice_flor_s_file(subghz->txrx->protocol, "/ext/subghz/nice_floor_s_rx"); + subghz_parser_load_keeloq_file(subghz->txrx->parser, "/ext/subghz/keeloq_mfcodes"); + subghz_parser_load_nice_flor_s_file(subghz->txrx->parser, "/ext/subghz/nice_floor_s_rx"); - //subghz_protocol_enable_dump_text(subghz->protocol, subghz_text_callback, subghz); + //subghz_parser_enable_dump_text(subghz->protocol, subghz_text_callback, subghz); return subghz; } @@ -232,7 +234,7 @@ void subghz_free(SubGhz* subghz) { subghz->gui = NULL; //Worker & Protocol & History - subghz_protocol_free(subghz->txrx->protocol); + subghz_parser_free(subghz->txrx->parser); subghz_worker_free(subghz->txrx->worker); subghz_history_free(subghz->txrx->history); free(subghz->txrx); |