mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-22 05:14:46 -07:00
Update subghz.c
This commit is contained in:
@@ -67,6 +67,11 @@ SubGhz* subghz_alloc() {
|
||||
view_dispatcher_add_view(
|
||||
subghz->view_dispatcher, SubGhzViewIdTextInput, text_input_get_view(subghz->text_input));
|
||||
|
||||
// Byte Input
|
||||
subghz->byte_input = byte_input_alloc();
|
||||
view_dispatcher_add_view(
|
||||
subghz->view_dispatcher, SubGhzViewIdByteInput, byte_input_get_view(subghz->byte_input));
|
||||
|
||||
// Custom Widget
|
||||
subghz->widget = widget_alloc();
|
||||
view_dispatcher_add_view(
|
||||
@@ -138,7 +143,9 @@ SubGhz* subghz_alloc() {
|
||||
subghz->txrx->history = subghz_history_alloc();
|
||||
subghz->txrx->worker = subghz_worker_alloc();
|
||||
subghz->txrx->fff_data = flipper_format_string_alloc();
|
||||
|
||||
subghz->txrx->seed_data = malloc(sizeof(SeedData));
|
||||
subghz->txrx->fix_data = malloc(sizeof(FixData));
|
||||
subghz->txrx->cnt_data = malloc(sizeof(CntData));
|
||||
subghz->txrx->environment = subghz_environment_alloc();
|
||||
subghz_environment_set_came_atomo_rainbow_table_file_name(
|
||||
subghz->txrx->environment, "/ext/subghz/assets/came_atomo");
|
||||
@@ -182,6 +189,10 @@ void subghz_free(SubGhz* subghz) {
|
||||
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewIdTextInput);
|
||||
text_input_free(subghz->text_input);
|
||||
|
||||
// ByteInput
|
||||
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewIdByteInput);
|
||||
byte_input_free(subghz->byte_input);
|
||||
|
||||
// Custom Widget
|
||||
view_dispatcher_remove_view(subghz->view_dispatcher, SubGhzViewIdWidget);
|
||||
widget_free(subghz->widget);
|
||||
@@ -233,6 +244,9 @@ void subghz_free(SubGhz* subghz) {
|
||||
flipper_format_free(subghz->txrx->fff_data);
|
||||
subghz_history_free(subghz->txrx->history);
|
||||
free(subghz->txrx);
|
||||
free(subghz->txrx->seed_data);
|
||||
free(subghz->txrx->fix_data);
|
||||
free(subghz->txrx->cnt_data);
|
||||
|
||||
//Error string
|
||||
string_clear(subghz->error_str);
|
||||
|
||||
Reference in New Issue
Block a user