From 4bda9d966ef565f9624a1c318b7c7c74cebf86ae Mon Sep 17 00:00:00 2001 From: r3df0xx Date: Fri, 15 Apr 2022 21:56:26 +0300 Subject: [PATCH] rollback2 --- .../subghz/helpers/subghz_custom_event.h | 1 - .../subghz/scenes/subghz_scene_config.h | 3 +- .../subghz/scenes/subghz_scene_saved_menu.c | 15 ------- .../subghz/scenes/subghz_scene_seed.c | 43 ------------------- lib/subghz/protocols/faac_slh.c | 1 - 5 files changed, 1 insertion(+), 62 deletions(-) delete mode 100644 applications/subghz/scenes/subghz_scene_seed.c diff --git a/applications/subghz/helpers/subghz_custom_event.h b/applications/subghz/helpers/subghz_custom_event.h index 1d6542ea2..97920015a 100644 --- a/applications/subghz/helpers/subghz_custom_event.h +++ b/applications/subghz/helpers/subghz_custom_event.h @@ -13,7 +13,6 @@ typedef enum { SubGhzCustomEventSceneReceiverInfoTxStart, SubGhzCustomEventSceneReceiverInfoTxStop, SubGhzCustomEventSceneReceiverInfoSave, - SubGhzCustomEventByteInputDone, SubGhzCustomEventSceneSaveName, SubGhzCustomEventSceneSaveSuccess, SubGhzCustomEventSceneShowErrorBack, diff --git a/applications/subghz/scenes/subghz_scene_config.h b/applications/subghz/scenes/subghz_scene_config.h index f6d43cf09..71cd26689 100644 --- a/applications/subghz/scenes/subghz_scene_config.h +++ b/applications/subghz/scenes/subghz_scene_config.h @@ -21,5 +21,4 @@ ADD_SCENE(subghz, frequency_analyzer, FrequencyAnalyzer) ADD_SCENE(subghz, read_raw, ReadRAW) ADD_SCENE(subghz, more_raw, MoreRAW) ADD_SCENE(subghz, delete_raw, DeleteRAW) -ADD_SCENE(subghz, need_saving, NeedSaving) -ADD_SCENE(subghz, seed, Seed) \ No newline at end of file +ADD_SCENE(subghz, need_saving, NeedSaving) \ No newline at end of file diff --git a/applications/subghz/scenes/subghz_scene_saved_menu.c b/applications/subghz/scenes/subghz_scene_saved_menu.c index 74531c452..a65830f4b 100644 --- a/applications/subghz/scenes/subghz_scene_saved_menu.c +++ b/applications/subghz/scenes/subghz_scene_saved_menu.c @@ -4,7 +4,6 @@ enum SubmenuIndex { SubmenuIndexEmulate, SubmenuIndexEdit, SubmenuIndexDelete, - SubmenuIndexSeed }; void subghz_scene_saved_menu_submenu_callback(void* context, uint32_t index) { @@ -35,15 +34,6 @@ void subghz_scene_saved_menu_on_enter(void* context) { subghz_scene_saved_menu_submenu_callback, subghz); - if(strcmp(subghz->txrx->decoder_result->protocol->name, "Faac SLH") == 0) { - submenu_add_item( - subghz->submenu, - "Input Seed", - SubmenuIndexSeed, - subghz_scene_saved_menu_submenu_callback, - subghz); - } - submenu_set_selected_item( subghz->submenu, scene_manager_get_scene_state(subghz->scene_manager, SubGhzSceneSavedMenu)); @@ -70,11 +60,6 @@ bool subghz_scene_saved_menu_on_event(void* context, SceneManagerEvent event) { subghz->scene_manager, SubGhzSceneSavedMenu, SubmenuIndexEdit); scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSaveName); return true; - } else if(event.event == SubmenuIndexSeed) { - scene_manager_set_scene_state( - subghz->scene_manager, SubGhzSceneSavedMenu, SubmenuIndexSeed); - scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSeed); - return true; } } return false; diff --git a/applications/subghz/scenes/subghz_scene_seed.c b/applications/subghz/scenes/subghz_scene_seed.c deleted file mode 100644 index 5380a0b42..000000000 --- a/applications/subghz/scenes/subghz_scene_seed.c +++ /dev/null @@ -1,43 +0,0 @@ -#include "../subghz_i.h" - -void subghz_scene_seed_byte_input_callback(void* context) { - SubGhz* subghz = (SubGhz*)context; - - view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventByteInputDone); -} - -void subghz_scene_seed_on_enter(void* context) { - SubGhz* subghz = (SubGhz*) context; - - // Setup view - ByteInput* byte_input = subghz->byte_input; - byte_input_set_header_text(byte_input, "Enter seed in hex"); - byte_input_set_result_callback( - byte_input, - subghz_scene_seed_byte_input_callback, - NULL, - subghz, - subghz->txrx->seed_data->seed, - subghz->txrx->seed_data->seed_len); - view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdByteInput); -} - -bool subghz_scene_seed_on_event(void* context, SceneManagerEvent event) { - SubGhz* subghz = (SubGhz*)context; - - if(event.type == SceneManagerEventTypeCustom) { - if(event.event == SubGhzCustomEventByteInputDone) { - scene_manager_next_scene(subghz->scene_manager, SubGhzSceneTransmitter); - return true; - } - } - return false; -} - -void subghz_scene_seed_on_exit(void* context) { - SubGhz* subghz = (SubGhz*)context; - - // Clear view - byte_input_set_result_callback(subghz->byte_input, NULL, NULL, NULL, NULL, 0); - byte_input_set_header_text(subghz->byte_input, ""); -} \ No newline at end of file diff --git a/lib/subghz/protocols/faac_slh.c b/lib/subghz/protocols/faac_slh.c index 48ae15e4d..7eeba5af3 100644 --- a/lib/subghz/protocols/faac_slh.c +++ b/lib/subghz/protocols/faac_slh.c @@ -8,7 +8,6 @@ #include "../blocks/encoder.h" #include "../blocks/generic.h" #include "../blocks/math.h" -#include "../applications/subghz/subghz_i.h" #define TAG "SubGhzProtocolFaacSHL"