This commit is contained in:
r3df0xx 2022-04-11 02:10:32 +03:00
parent f10d95ddd6
commit 4a3e3aba34
4 changed files with 2 additions and 35 deletions

View File

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

View File

@ -1,7 +1,6 @@
#include "../subghz_i.h"
#include "../helpers/subghz_custom_event.h"
#include <dolphin/dolphin.h>
#include "applications/gui/modules/byte_input.h"
void subghz_scene_receiver_info_callback(GuiButtonType result, InputType type, void* context) {
furi_assert(context);
@ -16,9 +15,6 @@ void subghz_scene_receiver_info_callback(GuiButtonType result, InputType type, v
} else if((result == GuiButtonTypeRight) && (type == InputTypeShort)) {
view_dispatcher_send_custom_event(
subghz->view_dispatcher, SubGhzCustomEventSceneReceiverInfoSave);
} else if((result == GuiButtonTypeLeft) && (type == InputTypeShort)) {
view_dispatcher_send_custom_event(
subghz->view_dispatcher, SubGhzCustomEventSceneReceiverInfoNeedSeed);
}
}
@ -115,11 +111,6 @@ void subghz_scene_receiver_info_on_enter(void* context) {
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdWidget);
}
void byte_input_callback(void* context) {
SubGhz* subghz = (SubGhz*)context;
view_dispatcher_send_custom_event(subghz->view_dispatcher, SubGhzCustomEventViewReceiverOK);
}
bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event) {
SubGhz* subghz = context;
if(event.type == SceneManagerEventTypeCustom) {
@ -174,7 +165,6 @@ bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event)
if(!subghz_scene_receiver_info_update_parser(subghz)) {
return false;
}
if((subghz->txrx->decoder_result->protocol->flag & SubGhzProtocolFlag_Save) ==
SubGhzProtocolFlag_Save) {
subghz_file_name_clear(subghz);
@ -182,23 +172,6 @@ bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event)
}
return true;
}
else if(event.event == SubGhzCustomEventSceneReceiverInfoNeedSeed) {
//Need to input seed
SubGhz* subghz = (SubGhz*)context;
// Setup view
ByteInput* byte_input = subghz->byte_input;
byte_input_set_header_text(byte_input, "Enter seed");
byte_input_set_result_callback(
byte_input,
byte_input_callback,
NULL,
subghz,
subghz->seed_data->seed,
subghz->seed_data->seed_len);
view_dispatcher_switch_to_view(subghz->view_dispatcher, SubGhzViewIdByteInput);
return true;
}
} else if(event.type == SceneManagerEventTypeTick) {
if(subghz->txrx->hopper_state != SubGhzHopperStateOFF) {
subghz_hopper_update(subghz);

View File

@ -110,11 +110,6 @@ struct SubGhzTxRx {
typedef struct SubGhzTxRx SubGhzTxRx;
typedef struct {
uint8_t seed[4];
uint8_t seed_len;
} SeedData;
struct SubGhz {
Gui* gui;
NotificationApp* notifications;
@ -128,7 +123,6 @@ struct SubGhz {
Popup* popup;
TextInput* text_input;
ByteInput* byte_input;
SeedData* seed_data;
Widget* widget;
DialogsApp* dialogs;
char file_name[SUBGHZ_MAX_LEN_NAME + 1];

View File

@ -120,7 +120,7 @@ static bool subghz_protocol_faac_slh_gen_data(SubGhzProtocolEncoderFaacSLH* inst
uint32_t hop = 0;
uint32_t decrypt = 0;
uint64_t man = 0;
//instance->seed = 0x77ED7698;
instance->seed = 0x77ED7698;
int res = 0;
char fixx[8] = {};
int shiftby = 32;
@ -384,6 +384,7 @@ static void subghz_protocol_faac_slh_check_remote_controller
instance->btn = code_fix & 0xF;
uint32_t decrypt = 0;
uint64_t man;
instance->seed = 0x77ED7698;
for
M_EACH(manufacture_code, *subghz_keystore_get_data(keystore), SubGhzKeyArray_t) {