rollback2

This commit is contained in:
r3df0xx 2022-04-15 21:56:26 +03:00
parent 828b3dbcb2
commit 4bda9d966e
5 changed files with 1 additions and 62 deletions

View File

@ -13,7 +13,6 @@ typedef enum {
SubGhzCustomEventSceneReceiverInfoTxStart, SubGhzCustomEventSceneReceiverInfoTxStart,
SubGhzCustomEventSceneReceiverInfoTxStop, SubGhzCustomEventSceneReceiverInfoTxStop,
SubGhzCustomEventSceneReceiverInfoSave, SubGhzCustomEventSceneReceiverInfoSave,
SubGhzCustomEventByteInputDone,
SubGhzCustomEventSceneSaveName, SubGhzCustomEventSceneSaveName,
SubGhzCustomEventSceneSaveSuccess, SubGhzCustomEventSceneSaveSuccess,
SubGhzCustomEventSceneShowErrorBack, SubGhzCustomEventSceneShowErrorBack,

View File

@ -22,4 +22,3 @@ ADD_SCENE(subghz, read_raw, ReadRAW)
ADD_SCENE(subghz, more_raw, MoreRAW) ADD_SCENE(subghz, more_raw, MoreRAW)
ADD_SCENE(subghz, delete_raw, DeleteRAW) ADD_SCENE(subghz, delete_raw, DeleteRAW)
ADD_SCENE(subghz, need_saving, NeedSaving) ADD_SCENE(subghz, need_saving, NeedSaving)
ADD_SCENE(subghz, seed, Seed)

View File

@ -4,7 +4,6 @@ enum SubmenuIndex {
SubmenuIndexEmulate, SubmenuIndexEmulate,
SubmenuIndexEdit, SubmenuIndexEdit,
SubmenuIndexDelete, SubmenuIndexDelete,
SubmenuIndexSeed
}; };
void subghz_scene_saved_menu_submenu_callback(void* context, uint32_t index) { 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_scene_saved_menu_submenu_callback,
subghz); 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( submenu_set_selected_item(
subghz->submenu, subghz->submenu,
scene_manager_get_scene_state(subghz->scene_manager, SubGhzSceneSavedMenu)); 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); subghz->scene_manager, SubGhzSceneSavedMenu, SubmenuIndexEdit);
scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSaveName); scene_manager_next_scene(subghz->scene_manager, SubGhzSceneSaveName);
return true; 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; return false;

View File

@ -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, "");
}

View File

@ -8,7 +8,6 @@
#include "../blocks/encoder.h" #include "../blocks/encoder.h"
#include "../blocks/generic.h" #include "../blocks/generic.h"
#include "../blocks/math.h" #include "../blocks/math.h"
#include "../applications/subghz/subghz_i.h"
#define TAG "SubGhzProtocolFaacSHL" #define TAG "SubGhzProtocolFaacSHL"