From 444035d06aeee5874ef5b95cb4387e592498c142 Mon Sep 17 00:00:00 2001 From: Der Skythe Date: Wed, 14 Sep 2022 18:12:27 +0400 Subject: [PATCH] Add missing settings --- .../subghz/scenes/subghz_scene_receiver_config.c | 3 +++ applications/subghz/subghz_last_setting.c | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/applications/subghz/scenes/subghz_scene_receiver_config.c b/applications/subghz/scenes/subghz_scene_receiver_config.c index 29d927b12..6cffe5428 100644 --- a/applications/subghz/scenes/subghz_scene_receiver_config.c +++ b/applications/subghz/scenes/subghz_scene_receiver_config.c @@ -177,6 +177,7 @@ static void subghz_scene_receiver_config_set_rssi_threshold(VariableItem* item) subghz_receiver_search_decoder_base_by_name( subghz->txrx->receiver, SUBGHZ_PROTOCOL_RAW_NAME), rssi_threshold_value[index]); + subghz->last_setting->rssi_threshold = rssi_threshold_value[index]; } static void subghz_scene_receiver_config_set_detect_raw(VariableItem* item) { @@ -186,6 +187,8 @@ static void subghz_scene_receiver_config_set_detect_raw(VariableItem* item) { variable_item_set_current_value_text(item, detect_raw_text[index]); subghz_receiver_set_filter(subghz->txrx->receiver, detect_raw_value[index]); + subghz->last_setting->detect_raw = detect_raw_value[index]; + subghz_protocol_decoder_raw_set_auto_mode( subghz_receiver_search_decoder_base_by_name( subghz->txrx->receiver, SUBGHZ_PROTOCOL_RAW_NAME), diff --git a/applications/subghz/subghz_last_setting.c b/applications/subghz/subghz_last_setting.c index d28bddcc1..f4106293a 100644 --- a/applications/subghz/subghz_last_setting.c +++ b/applications/subghz/subghz_last_setting.c @@ -133,11 +133,11 @@ bool subghz_last_setting_save(SubGhzLastSetting* instance, const char* file_path void subghz_last_setting_set_receiver_values(SubGhzLastSetting* instance, SubGhzReceiver* receiver) { subghz_receiver_set_filter(receiver, instance->detect_raw); - // subghz_protocol_decoder_raw_set_auto_mode( - // subghz_receiver_search_decoder_base_by_name(receiver, SUBGHZ_PROTOCOL_RAW_NAME), - // (instance->detect_raw != SubGhzProtocolFlag_Decodable)); + subghz_protocol_decoder_raw_set_auto_mode( + subghz_receiver_search_decoder_base_by_name(receiver, SUBGHZ_PROTOCOL_RAW_NAME), + (instance->detect_raw != SubGhzProtocolFlag_Decodable)); - // subghz_protocol_decoder_raw_set_rssi_threshold( - // subghz_receiver_search_decoder_base_by_name(receiver, SUBGHZ_PROTOCOL_RAW_NAME), - // instance->rssi_threshold); + subghz_protocol_decoder_raw_set_rssi_threshold( + subghz_receiver_search_decoder_base_by_name(receiver, SUBGHZ_PROTOCOL_RAW_NAME), + instance->rssi_threshold); } \ No newline at end of file