free up some ram for now, use settings user

This commit is contained in:
MX
2025-04-12 03:03:50 +03:00
parent 638182a5ff
commit 66a7050221
3 changed files with 18 additions and 3 deletions
@@ -20,6 +20,19 @@ Version: 1
# Custom preset
# 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: FM95
#Custom_preset_module: CC1101
#Custom_preset_data: 02 0D 0B 06 08 32 07 04 14 00 13 02 12 04 11 83 10 67 15 24 18 18 19 16 1D 91 1C 00 1B 07 20 FB 22 10 21 56 00 00 C0 00 00 00 00 00 00 00
#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
#Custom_preset_name: Pagers
#Custom_preset_module: CC1101
#Custom_preset_data: 02 0D 07 04 08 32 0B 06 10 64 11 93 12 0C 13 02 14 00 15 15 18 18 19 16 1B 07 1C 00 1D 91 20 FB 21 56 22 10 00 00 C0 00 00 00 00 00 00 00
#Custom_preset_name: AM_1
#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
+4 -3
View File
@@ -56,11 +56,11 @@ static void subghz_rpc_command_callback(const RpcAppSystemEvent* event, void* co
rpc_system_app_confirm(subghz->rpc_ctx, false);
}
}
/*
static void subghz_load_custom_presets(SubGhzSetting* setting) {
furi_assert(setting);
const char* presets[][2] = {
const char* presets[3][2] = {
{"FM95",
"02 0D 0B 06 08 32 07 04 14 00 13 02 12 04 11 83 10 67 15 24 18 18 19 16 1D 91 1C 00 1B 07 20 FB 22 10 21 56 00 00 C0 00 00 00 00 00 00 00"},
@@ -88,6 +88,7 @@ static void subghz_load_custom_presets(SubGhzSetting* setting) {
subghz_setting_customs_presets_to_log(setting);
#endif
}
*/
SubGhz* subghz_alloc(bool alloc_for_tx_only) {
SubGhz* subghz = malloc(sizeof(SubGhz));
@@ -194,7 +195,7 @@ SubGhz* subghz_alloc(bool alloc_for_tx_only) {
SubGhzSetting* setting = subghz_txrx_get_setting(subghz->txrx);
subghz_load_custom_presets(setting);
//subghz_load_custom_presets(setting);
// Load last used values for Read, Read RAW, etc. or default
subghz->last_settings = subghz_last_settings_alloc();
+1
View File
@@ -296,6 +296,7 @@ void subghz_setting_load(SubGhzSetting* instance, const char* file_path) {
FURI_LOG_E(TAG, "Rewind error");
break;
}
furi_string_reset(temp_str);
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(