mirror of
https://github.com/Next-Flip/Momentum-Firmware.git
synced 2026-05-17 04:34:44 -07:00
rollback
This commit is contained in:
@@ -13,7 +13,6 @@ typedef enum {
|
|||||||
SubGhzCustomEventSceneReceiverInfoTxStart,
|
SubGhzCustomEventSceneReceiverInfoTxStart,
|
||||||
SubGhzCustomEventSceneReceiverInfoTxStop,
|
SubGhzCustomEventSceneReceiverInfoTxStop,
|
||||||
SubGhzCustomEventSceneReceiverInfoSave,
|
SubGhzCustomEventSceneReceiverInfoSave,
|
||||||
SubGhzCustomEventSceneReceiverInfoNeedSeed,
|
|
||||||
SubGhzCustomEventSceneSaveName,
|
SubGhzCustomEventSceneSaveName,
|
||||||
SubGhzCustomEventSceneSaveSuccess,
|
SubGhzCustomEventSceneSaveSuccess,
|
||||||
SubGhzCustomEventSceneShowErrorBack,
|
SubGhzCustomEventSceneShowErrorBack,
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
#include "../subghz_i.h"
|
#include "../subghz_i.h"
|
||||||
#include "../helpers/subghz_custom_event.h"
|
#include "../helpers/subghz_custom_event.h"
|
||||||
#include <dolphin/dolphin.h>
|
#include <dolphin/dolphin.h>
|
||||||
#include "applications/gui/modules/byte_input.h"
|
|
||||||
|
|
||||||
void subghz_scene_receiver_info_callback(GuiButtonType result, InputType type, void* context) {
|
void subghz_scene_receiver_info_callback(GuiButtonType result, InputType type, void* context) {
|
||||||
furi_assert(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)) {
|
} else if((result == GuiButtonTypeRight) && (type == InputTypeShort)) {
|
||||||
view_dispatcher_send_custom_event(
|
view_dispatcher_send_custom_event(
|
||||||
subghz->view_dispatcher, SubGhzCustomEventSceneReceiverInfoSave);
|
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);
|
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) {
|
bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event) {
|
||||||
SubGhz* subghz = context;
|
SubGhz* subghz = context;
|
||||||
if(event.type == SceneManagerEventTypeCustom) {
|
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)) {
|
if(!subghz_scene_receiver_info_update_parser(subghz)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
if((subghz->txrx->decoder_result->protocol->flag & SubGhzProtocolFlag_Save) ==
|
if((subghz->txrx->decoder_result->protocol->flag & SubGhzProtocolFlag_Save) ==
|
||||||
SubGhzProtocolFlag_Save) {
|
SubGhzProtocolFlag_Save) {
|
||||||
subghz_file_name_clear(subghz);
|
subghz_file_name_clear(subghz);
|
||||||
@@ -182,23 +172,6 @@ bool subghz_scene_receiver_info_on_event(void* context, SceneManagerEvent event)
|
|||||||
}
|
}
|
||||||
return true;
|
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) {
|
} else if(event.type == SceneManagerEventTypeTick) {
|
||||||
if(subghz->txrx->hopper_state != SubGhzHopperStateOFF) {
|
if(subghz->txrx->hopper_state != SubGhzHopperStateOFF) {
|
||||||
subghz_hopper_update(subghz);
|
subghz_hopper_update(subghz);
|
||||||
|
|||||||
@@ -110,11 +110,6 @@ struct SubGhzTxRx {
|
|||||||
|
|
||||||
typedef struct SubGhzTxRx SubGhzTxRx;
|
typedef struct SubGhzTxRx SubGhzTxRx;
|
||||||
|
|
||||||
typedef struct {
|
|
||||||
uint8_t seed[4];
|
|
||||||
uint8_t seed_len;
|
|
||||||
} SeedData;
|
|
||||||
|
|
||||||
struct SubGhz {
|
struct SubGhz {
|
||||||
Gui* gui;
|
Gui* gui;
|
||||||
NotificationApp* notifications;
|
NotificationApp* notifications;
|
||||||
@@ -128,7 +123,6 @@ struct SubGhz {
|
|||||||
Popup* popup;
|
Popup* popup;
|
||||||
TextInput* text_input;
|
TextInput* text_input;
|
||||||
ByteInput* byte_input;
|
ByteInput* byte_input;
|
||||||
SeedData* seed_data;
|
|
||||||
Widget* widget;
|
Widget* widget;
|
||||||
DialogsApp* dialogs;
|
DialogsApp* dialogs;
|
||||||
char file_name[SUBGHZ_MAX_LEN_NAME + 1];
|
char file_name[SUBGHZ_MAX_LEN_NAME + 1];
|
||||||
|
|||||||
@@ -120,7 +120,7 @@ static bool subghz_protocol_faac_slh_gen_data(SubGhzProtocolEncoderFaacSLH* inst
|
|||||||
uint32_t hop = 0;
|
uint32_t hop = 0;
|
||||||
uint32_t decrypt = 0;
|
uint32_t decrypt = 0;
|
||||||
uint64_t man = 0;
|
uint64_t man = 0;
|
||||||
//instance->seed = 0x77ED7698;
|
instance->seed = 0x77ED7698;
|
||||||
int res = 0;
|
int res = 0;
|
||||||
char fixx[8] = {};
|
char fixx[8] = {};
|
||||||
int shiftby = 32;
|
int shiftby = 32;
|
||||||
@@ -384,6 +384,7 @@ static void subghz_protocol_faac_slh_check_remote_controller
|
|||||||
instance->btn = code_fix & 0xF;
|
instance->btn = code_fix & 0xF;
|
||||||
uint32_t decrypt = 0;
|
uint32_t decrypt = 0;
|
||||||
uint64_t man;
|
uint64_t man;
|
||||||
|
instance->seed = 0x77ED7698;
|
||||||
|
|
||||||
for
|
for
|
||||||
M_EACH(manufacture_code, *subghz_keystore_get_data(keystore), SubGhzKeyArray_t) {
|
M_EACH(manufacture_code, *subghz_keystore_get_data(keystore), SubGhzKeyArray_t) {
|
||||||
|
|||||||
Reference in New Issue
Block a user