mirror of
https://github.com/DarkFlippers/unleashed-firmware
synced 2024-11-23 04:53:08 +00:00
Reduce subghz add manually scene flash size
by @Willy-JL
This commit is contained in:
parent
f5cc40af0c
commit
dd87afcbde
4 changed files with 804 additions and 865 deletions
|
@ -5,68 +5,6 @@ typedef enum {
|
||||||
SubGhzCustomEventManagerSet,
|
SubGhzCustomEventManagerSet,
|
||||||
SubGhzCustomEventManagerSetRAW,
|
SubGhzCustomEventManagerSetRAW,
|
||||||
|
|
||||||
//SubmenuIndex
|
|
||||||
SubmenuIndexFaacSLH_Manual_433,
|
|
||||||
SubmenuIndexFaacSLH_Manual_868,
|
|
||||||
SubmenuIndexFaacSLH_433,
|
|
||||||
SubmenuIndexFaacSLH_868,
|
|
||||||
SubmenuIndexBFTClone,
|
|
||||||
SubmenuIndexBFTMitto,
|
|
||||||
SubmenuIndexSomfyTelis,
|
|
||||||
SubmenuIndexBeninca433,
|
|
||||||
SubmenuIndexBeninca868,
|
|
||||||
SubmenuIndexAllmatic433,
|
|
||||||
SubmenuIndexAllmatic868,
|
|
||||||
SubmenuIndexCenturion433,
|
|
||||||
SubmenuIndexIronLogic,
|
|
||||||
SubmenuIndexElmesElectronic,
|
|
||||||
SubmenuIndexSommer_FM_434,
|
|
||||||
SubmenuIndexSommer_FM_868,
|
|
||||||
SubmenuIndexStilmatic,
|
|
||||||
SubmenuIndexDTMNeo433,
|
|
||||||
SubmenuIndexDeaMio433,
|
|
||||||
SubmenuIndexGibidi433,
|
|
||||||
SubmenuIndexNiceMHouse_433_92,
|
|
||||||
SubmenuIndexJCM_433_92,
|
|
||||||
SubmenuIndexFAACRCXT_433_92,
|
|
||||||
SubmenuIndexFAACRCXT_868,
|
|
||||||
SubmenuIndexNormstahl_433_92,
|
|
||||||
SubmenuIndexGeniusBravo433,
|
|
||||||
SubmenuIndexGSN,
|
|
||||||
SubmenuIndexAprimatic,
|
|
||||||
SubmenuIndexHCS101_433_92,
|
|
||||||
SubmenuIndexANMotorsAT4,
|
|
||||||
SubmenuIndexAlutechAT4N,
|
|
||||||
SubmenuIndexNiceFlo12bit,
|
|
||||||
SubmenuIndexNiceFlo24bit,
|
|
||||||
SubmenuIndexNiceFlorS_433_92,
|
|
||||||
SubmenuIndexNiceOne_433_92,
|
|
||||||
SubmenuIndexNiceSmilo_433_92,
|
|
||||||
SubmenuIndexCAME12bit,
|
|
||||||
SubmenuIndexCAME24bit,
|
|
||||||
SubmenuIndexCAME12bit868,
|
|
||||||
SubmenuIndexCAME24bit868,
|
|
||||||
SubmenuIndexCAMETwee,
|
|
||||||
SubmenuIndexCAMESpace,
|
|
||||||
SubmenuIndexCameAtomo433,
|
|
||||||
SubmenuIndexCameAtomo868,
|
|
||||||
SubmenuIndexPricenton433,
|
|
||||||
SubmenuIndexPricenton315,
|
|
||||||
SubmenuIndexBETT_433,
|
|
||||||
SubmenuIndexLinear_300_00,
|
|
||||||
SubmenuIndexNeroSketch, //Deleted in OFW
|
|
||||||
SubmenuIndexNeroRadio, //Deleted in OFW
|
|
||||||
SubmenuIndexGateTX,
|
|
||||||
SubmenuIndexDoorHan_315_00,
|
|
||||||
SubmenuIndexDoorHan_433_92,
|
|
||||||
SubmenuIndexSecPlus_v1_315_00,
|
|
||||||
SubmenuIndexSecPlus_v1_390_00,
|
|
||||||
SubmenuIndexSecPlus_v1_433_00,
|
|
||||||
SubmenuIndexSecPlus_v2_310_00,
|
|
||||||
SubmenuIndexSecPlus_v2_315_00,
|
|
||||||
SubmenuIndexSecPlus_v2_390_00,
|
|
||||||
SubmenuIndexSecPlus_v2_433_00,
|
|
||||||
|
|
||||||
//SubGhzCustomEvent
|
//SubGhzCustomEvent
|
||||||
SubGhzCustomEventSceneDeleteSuccess = 100,
|
SubGhzCustomEventSceneDeleteSuccess = 100,
|
||||||
SubGhzCustomEventSceneDelete,
|
SubGhzCustomEventSceneDelete,
|
||||||
|
@ -123,3 +61,68 @@ typedef enum {
|
||||||
|
|
||||||
SubGhzCustomEventByteInputDone,
|
SubGhzCustomEventByteInputDone,
|
||||||
} SubGhzCustomEvent;
|
} SubGhzCustomEvent;
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
SetTypeFaacSLH_Manual_868,
|
||||||
|
SetTypeFaacSLH_Manual_433,
|
||||||
|
SetTypeBFTClone,
|
||||||
|
SetTypeFaacSLH_868,
|
||||||
|
SetTypeFaacSLH_433,
|
||||||
|
SetTypeBFTMitto,
|
||||||
|
SetTypeSomfyTelis,
|
||||||
|
SetTypeANMotorsAT4,
|
||||||
|
SetTypeAlutechAT4N,
|
||||||
|
SetTypeHCS101_433_92,
|
||||||
|
SetTypeDoorHan_315_00,
|
||||||
|
SetTypeDoorHan_433_92,
|
||||||
|
SetTypeBeninca433,
|
||||||
|
SetTypeBeninca868,
|
||||||
|
SetTypeAllmatic433,
|
||||||
|
SetTypeAllmatic868,
|
||||||
|
SetTypeCenturion433,
|
||||||
|
SetTypeSommer_FM_434,
|
||||||
|
SetTypeSommer_FM_868,
|
||||||
|
SetTypeStilmatic,
|
||||||
|
SetTypeIronLogic,
|
||||||
|
SetTypeDeaMio433,
|
||||||
|
SetTypeDTMNeo433,
|
||||||
|
SetTypeGibidi433,
|
||||||
|
SetTypeGSN,
|
||||||
|
SetTypeAprimatic,
|
||||||
|
SetTypeElmesElectronic,
|
||||||
|
SetTypeNormstahl_433_92,
|
||||||
|
SetTypeJCM_433_92,
|
||||||
|
SetTypeFAACRCXT_433_92,
|
||||||
|
SetTypeFAACRCXT_868,
|
||||||
|
SetTypeGeniusBravo433,
|
||||||
|
SetTypeNiceMHouse_433_92,
|
||||||
|
SetTypeNiceSmilo_433_92,
|
||||||
|
SetTypeNiceFlorS_433_92,
|
||||||
|
SetTypeNiceOne_433_92,
|
||||||
|
SetTypeNiceFlo12bit,
|
||||||
|
SetTypeNiceFlo24bit,
|
||||||
|
SetTypeCAME12bit,
|
||||||
|
SetTypeCAME24bit,
|
||||||
|
SetTypeCAME12bit868,
|
||||||
|
SetTypeCAME24bit868,
|
||||||
|
SetTypeCAMETwee,
|
||||||
|
SetTypeCameAtomo433,
|
||||||
|
SetTypeCameAtomo868,
|
||||||
|
SetTypeCAMESpace,
|
||||||
|
SetTypePricenton315,
|
||||||
|
SetTypePricenton433,
|
||||||
|
SetTypeBETT_433,
|
||||||
|
SetTypeLinear_300_00,
|
||||||
|
// SetTypeNeroSketch, //Deleted in OFW
|
||||||
|
// SetTypeNeroRadio, //Deleted in OFW
|
||||||
|
SetTypeGateTX,
|
||||||
|
SetTypeSecPlus_v1_315_00,
|
||||||
|
SetTypeSecPlus_v1_390_00,
|
||||||
|
SetTypeSecPlus_v1_433_00,
|
||||||
|
SetTypeSecPlus_v2_310_00,
|
||||||
|
SetTypeSecPlus_v2_315_00,
|
||||||
|
SetTypeSecPlus_v2_390_00,
|
||||||
|
SetTypeSecPlus_v2_433_00,
|
||||||
|
|
||||||
|
SetTypeMAX,
|
||||||
|
} SetType;
|
||||||
|
|
|
@ -17,7 +17,7 @@ void subghz_scene_set_cnt_on_enter(void* context) {
|
||||||
scene_manager_get_scene_state(subghz->scene_manager, SubGhzSceneSetType);
|
scene_manager_get_scene_state(subghz->scene_manager, SubGhzSceneSetType);
|
||||||
|
|
||||||
switch(state) {
|
switch(state) {
|
||||||
case SubmenuIndexBFTClone:
|
case SetTypeBFTClone:
|
||||||
byte_input_set_header_text(byte_input, "Enter COUNTER in Hex");
|
byte_input_set_header_text(byte_input, "Enter COUNTER in Hex");
|
||||||
byte_input_set_result_callback(
|
byte_input_set_result_callback(
|
||||||
byte_input,
|
byte_input,
|
||||||
|
@ -27,8 +27,8 @@ void subghz_scene_set_cnt_on_enter(void* context) {
|
||||||
subghz->secure_data->cnt,
|
subghz->secure_data->cnt,
|
||||||
2);
|
2);
|
||||||
break;
|
break;
|
||||||
case SubmenuIndexFaacSLH_Manual_433:
|
case SetTypeFaacSLH_Manual_433:
|
||||||
case SubmenuIndexFaacSLH_Manual_868:
|
case SetTypeFaacSLH_Manual_868:
|
||||||
byte_input_set_header_text(byte_input, "Enter COUNTER in Hex 20 bits");
|
byte_input_set_header_text(byte_input, "Enter COUNTER in Hex 20 bits");
|
||||||
byte_input_set_result_callback(
|
byte_input_set_result_callback(
|
||||||
byte_input,
|
byte_input,
|
||||||
|
|
|
@ -32,11 +32,11 @@ bool subghz_scene_set_seed_on_event(void* context, SceneManagerEvent event) {
|
||||||
uint32_t fix_part, cnt, seed;
|
uint32_t fix_part, cnt, seed;
|
||||||
if(event.type == SceneManagerEventTypeCustom) {
|
if(event.type == SceneManagerEventTypeCustom) {
|
||||||
if(event.event == SubGhzCustomEventByteInputDone) {
|
if(event.event == SubGhzCustomEventByteInputDone) {
|
||||||
SubGhzCustomEvent state =
|
SetType state =
|
||||||
scene_manager_get_scene_state(subghz->scene_manager, SubGhzSceneSetType);
|
scene_manager_get_scene_state(subghz->scene_manager, SubGhzSceneSetType);
|
||||||
|
|
||||||
switch(state) {
|
switch(state) {
|
||||||
case SubmenuIndexBFTClone:
|
case SetTypeBFTClone:
|
||||||
fix_part = subghz->secure_data->fix[0] << 24 | subghz->secure_data->fix[1] << 16 |
|
fix_part = subghz->secure_data->fix[0] << 24 | subghz->secure_data->fix[1] << 16 |
|
||||||
subghz->secure_data->fix[2] << 8 | subghz->secure_data->fix[3];
|
subghz->secure_data->fix[2] << 8 | subghz->secure_data->fix[3];
|
||||||
|
|
||||||
|
@ -62,8 +62,8 @@ bool subghz_scene_set_seed_on_event(void* context, SceneManagerEvent event) {
|
||||||
}
|
}
|
||||||
consumed = true;
|
consumed = true;
|
||||||
break;
|
break;
|
||||||
case SubmenuIndexFaacSLH_Manual_433:
|
case SetTypeFaacSLH_Manual_433:
|
||||||
case SubmenuIndexFaacSLH_Manual_868:
|
case SetTypeFaacSLH_Manual_868:
|
||||||
fix_part = subghz->secure_data->fix[0] << 24 | subghz->secure_data->fix[1] << 16 |
|
fix_part = subghz->secure_data->fix[0] << 24 | subghz->secure_data->fix[1] << 16 |
|
||||||
subghz->secure_data->fix[2] << 8 | subghz->secure_data->fix[3];
|
subghz->secure_data->fix[2] << 8 | subghz->secure_data->fix[3];
|
||||||
|
|
||||||
|
@ -73,7 +73,7 @@ bool subghz_scene_set_seed_on_event(void* context, SceneManagerEvent event) {
|
||||||
seed = subghz->secure_data->seed[0] << 24 | subghz->secure_data->seed[1] << 16 |
|
seed = subghz->secure_data->seed[0] << 24 | subghz->secure_data->seed[1] << 16 |
|
||||||
subghz->secure_data->seed[2] << 8 | subghz->secure_data->seed[3];
|
subghz->secure_data->seed[2] << 8 | subghz->secure_data->seed[3];
|
||||||
|
|
||||||
if(state == SubmenuIndexFaacSLH_Manual_433) {
|
if(state == SetTypeFaacSLH_Manual_433) {
|
||||||
generated_protocol = subghz_txrx_gen_faac_slh_protocol(
|
generated_protocol = subghz_txrx_gen_faac_slh_protocol(
|
||||||
subghz->txrx,
|
subghz->txrx,
|
||||||
"AM650",
|
"AM650",
|
||||||
|
@ -83,7 +83,7 @@ bool subghz_scene_set_seed_on_event(void* context, SceneManagerEvent event) {
|
||||||
(cnt & 0xFFFFF),
|
(cnt & 0xFFFFF),
|
||||||
seed,
|
seed,
|
||||||
"FAAC_SLH");
|
"FAAC_SLH");
|
||||||
} else if(state == SubmenuIndexFaacSLH_Manual_868) {
|
} else if(state == SetTypeFaacSLH_Manual_868) {
|
||||||
generated_protocol = subghz_txrx_gen_faac_slh_protocol(
|
generated_protocol = subghz_txrx_gen_faac_slh_protocol(
|
||||||
subghz->txrx,
|
subghz->txrx,
|
||||||
"AM650",
|
"AM650",
|
||||||
|
|
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue