From 0f81248579805fd41546b514a23cdee0a9fbf9db Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Tue, 15 Nov 2022 22:46:58 +0300 Subject: [PATCH 1/2] Add new freq and modulation to user config --- assets/resources/subghz/assets/setting_user | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/assets/resources/subghz/assets/setting_user b/assets/resources/subghz/assets/setting_user index 9caedde2c..d09fe0676 100644 --- a/assets/resources/subghz/assets/setting_user +++ b/assets/resources/subghz/assets/setting_user @@ -25,6 +25,7 @@ Frequency: 313000000 Frequency: 313850000 Frequency: 314000000 Frequency: 314350000 +Frequency: 314980000 Frequency: 315000000 Frequency: 318000000 Frequency: 330000000 @@ -67,7 +68,7 @@ Hopper_frequency: 433920000 Hopper_frequency: 434420000 Hopper_frequency: 868350000 -# Custom preset +# Custom preset examples # format for CC1101 "Custom_preset_data:" XX YY XX YY .. 00 00 ZZ ZZ ZZ ZZ ZZ ZZ ZZ ZZ, where: XX-register, YY - register data, 00 00 - end load register, ZZ - 8 byte Pa table register #Custom_preset_name: AM_1 @@ -78,6 +79,17 @@ Hopper_frequency: 868350000 #Custom_preset_module: CC1101 #Custom_preset_data: 02 0D 03 07 08 32 0B 06 14 00 13 00 12 30 11 32 10 17 18 18 19 18 1D 91 1C 00 1B 07 20 FB 22 11 21 B6 00 00 00 C0 00 00 00 00 00 00 +# Custom presets added in Unleashed FW +# -- Some presets from forum.flipperzero.one -- + +#2-FSK 200khz BW / 135kHz Filter/ 15.86Khz Deviation + Ramping +Custom_preset_name: FM15k +Custom_preset_module: CC1101 +Custom_preset_data: 02 0D 03 47 08 32 0B 06 15 32 14 00 13 00 12 00 11 32 10 A7 18 18 19 1D 1D 92 1C 00 1B 04 20 FB 22 17 21 B6 00 00 00 12 0E 34 60 C5 C1 C0 + +# -- Other presets -- + +# Honda Presets Custom_preset_name: HND_1 Custom_preset_module: CC1101 # G2 G3 G4 D L0 L1 L2 From 0e9f6bef776a8697f5b7c26348a60c66b43ec797 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Tue, 15 Nov 2022 23:00:30 +0300 Subject: [PATCH 2/2] Speedup subghz favourites if custom modulation was used, its saved in file itself, so no need to load it when using quick access from favourites --- lib/subghz/subghz_setting.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/subghz/subghz_setting.c b/lib/subghz/subghz_setting.c index 4d0167eca..574365efa 100644 --- a/lib/subghz/subghz_setting.c +++ b/lib/subghz/subghz_setting.c @@ -265,17 +265,17 @@ void subghz_setting_load(SubGhzSetting* instance, const char* file_path, bool no fff_data_file, "Default_frequency", &temp_data32, 1)) { subghz_setting_set_default_frequency(instance, temp_data32); } - } - // custom preset (optional) - if(!flipper_format_rewind(fff_data_file)) { - FURI_LOG_E(TAG, "Rewind error"); - break; - } - while(flipper_format_read_string(fff_data_file, "Custom_preset_name", temp_str)) { - FURI_LOG_I(TAG, "Custom preset loaded %s", furi_string_get_cstr(temp_str)); - subghz_setting_load_custom_preset( - instance, furi_string_get_cstr(temp_str), fff_data_file); + // custom preset (optional) + if(!flipper_format_rewind(fff_data_file)) { + FURI_LOG_E(TAG, "Rewind error"); + break; + } + while(flipper_format_read_string(fff_data_file, "Custom_preset_name", temp_str)) { + FURI_LOG_I(TAG, "Custom preset loaded %s", furi_string_get_cstr(temp_str)); + subghz_setting_load_custom_preset( + instance, furi_string_get_cstr(temp_str), fff_data_file); + } } } while(false);