From 7b44221d9a6101996c67ffe753b83f2215bb1d3e Mon Sep 17 00:00:00 2001 From: gid9798 <30450294+gid9798@users.noreply.github.com> Date: Tue, 13 Jun 2023 22:36:34 +0300 Subject: [PATCH] Drop timestamp_file_names in hal --- .../main/subghz/scenes/subghz_scene_radio_settings.c | 3 +-- applications/main/subghz/scenes/subghz_scene_save_name.c | 2 +- applications/main/subghz/subghz_last_settings.c | 3 --- firmware/targets/f7/api_symbols.csv | 4 +--- firmware/targets/f7/furi_hal/furi_hal_subghz.c | 9 --------- firmware/targets/f7/furi_hal/furi_hal_subghz.h | 8 -------- 6 files changed, 3 insertions(+), 26 deletions(-) diff --git a/applications/main/subghz/scenes/subghz_scene_radio_settings.c b/applications/main/subghz/scenes/subghz_scene_radio_settings.c index b60ea0b2d..3020c1b23 100644 --- a/applications/main/subghz/scenes/subghz_scene_radio_settings.c +++ b/applications/main/subghz/scenes/subghz_scene_radio_settings.c @@ -111,7 +111,6 @@ static void subghz_scene_receiver_config_set_timestamp_file_names(VariableItem* variable_item_set_current_value_text(item, timestamp_names_text[index]); - furi_hal_subghz_set_timestamp_file_names((index == 1)); subghz->last_settings->timestamp_file_names = (index == 1); subghz_last_settings_save(subghz->last_settings); } @@ -148,7 +147,7 @@ void subghz_scene_radio_settings_on_enter(void* context) { TIMESTAMP_NAMES_COUNT, subghz_scene_receiver_config_set_timestamp_file_names, subghz); - value_index = furi_hal_subghz_get_timestamp_file_names(); + value_index = subghz->last_settings->timestamp_file_names; variable_item_set_current_value_index(item, value_index); variable_item_set_current_value_text(item, timestamp_names_text[value_index]); diff --git a/applications/main/subghz/scenes/subghz_scene_save_name.c b/applications/main/subghz/scenes/subghz_scene_save_name.c index c05d0d962..5c52ed957 100644 --- a/applications/main/subghz/scenes/subghz_scene_save_name.c +++ b/applications/main/subghz/scenes/subghz_scene_save_name.c @@ -56,7 +56,7 @@ void subghz_scene_save_name_on_enter(void* context) { if(!subghz_path_is_file(subghz->file_path)) { char file_name_buf[SUBGHZ_MAX_LEN_NAME] = {0}; - if(furi_hal_subghz_get_timestamp_file_names()) { + if(subghz->last_settings->timestamp_file_names) { SubGhzProtocolDecoderBase* decoder_result = subghz_txrx_get_decoder(subghz->txrx); if(decoder_result != 0x0) { if(decoder_result != NULL) { diff --git a/applications/main/subghz/subghz_last_settings.c b/applications/main/subghz/subghz_last_settings.c index 7ee2554b0..614e0baa6 100644 --- a/applications/main/subghz/subghz_last_settings.c +++ b/applications/main/subghz/subghz_last_settings.c @@ -119,9 +119,6 @@ void subghz_last_settings_load(SubGhzLastSettings* instance, size_t preset_count instance->timestamp_file_names = temp_timestamp_file_names; - // Set globally - furi_hal_subghz_set_timestamp_file_names(instance->timestamp_file_names); - if(instance->external_module_power_5v_disable) { furi_hal_subghz_set_external_power_disable(true); furi_hal_subghz_disable_ext_power(); diff --git a/firmware/targets/f7/api_symbols.csv b/firmware/targets/f7/api_symbols.csv index aed57c63c..1e1ced11a 100644 --- a/firmware/targets/f7/api_symbols.csv +++ b/firmware/targets/f7/api_symbols.csv @@ -1,5 +1,5 @@ entry,status,name,type,params -Version,+,30.2,, +Version,+,31.0,, Header,+,applications/services/bt/bt_service/bt.h,, Header,+,applications/services/cli/cli.h,, Header,+,applications/services/cli/cli_vcp.h,, @@ -1405,7 +1405,6 @@ Function,+,furi_hal_subghz_get_lqi,uint8_t, Function,+,furi_hal_subghz_get_radio_type,SubGhzRadioType, Function,+,furi_hal_subghz_get_rolling_counter_mult,uint8_t, Function,+,furi_hal_subghz_get_rssi,float, -Function,+,furi_hal_subghz_get_timestamp_file_names,_Bool, Function,+,furi_hal_subghz_idle,void, Function,-,furi_hal_subghz_init,void, Function,-,furi_hal_subghz_init_check,_Bool, @@ -1429,7 +1428,6 @@ Function,+,furi_hal_subghz_set_frequency,uint32_t,uint32_t Function,+,furi_hal_subghz_set_frequency_and_path,uint32_t,uint32_t Function,+,furi_hal_subghz_set_path,void,FuriHalSubGhzPath Function,-,furi_hal_subghz_set_rolling_counter_mult,void,uint8_t -Function,-,furi_hal_subghz_set_timestamp_file_names,void,_Bool Function,-,furi_hal_subghz_shutdown,void, Function,+,furi_hal_subghz_sleep,void, Function,+,furi_hal_subghz_start_async_rx,void,"FuriHalSubGhzCaptureCallback, void*" diff --git a/firmware/targets/f7/furi_hal/furi_hal_subghz.c b/firmware/targets/f7/furi_hal/furi_hal_subghz.c index 8125971e9..aa7438b0b 100644 --- a/firmware/targets/f7/furi_hal/furi_hal_subghz.c +++ b/firmware/targets/f7/furi_hal/furi_hal_subghz.c @@ -41,7 +41,6 @@ volatile FuriHalSubGhz furi_hal_subghz = { .cc1101_g0_pin = &gpio_cc1101_g0, .rolling_counter_mult = 1, .ext_module_power_disabled = false, - .timestamp_file_names = false, .dangerous_frequency_i = false, }; @@ -90,14 +89,6 @@ bool furi_hal_subghz_get_external_power_disable(void) { return furi_hal_subghz.ext_module_power_disabled; } -void furi_hal_subghz_set_timestamp_file_names(bool state) { - furi_hal_subghz.timestamp_file_names = state; -} - -bool furi_hal_subghz_get_timestamp_file_names(void) { - return furi_hal_subghz.timestamp_file_names; -} - void furi_hal_subghz_set_dangerous_frequency(bool state_i) { furi_hal_subghz.dangerous_frequency_i = state_i; } diff --git a/firmware/targets/f7/furi_hal/furi_hal_subghz.h b/firmware/targets/f7/furi_hal/furi_hal_subghz.h index 0ef7bd90a..ae6876d45 100644 --- a/firmware/targets/f7/furi_hal/furi_hal_subghz.h +++ b/firmware/targets/f7/furi_hal/furi_hal_subghz.h @@ -332,14 +332,6 @@ void furi_hal_subghz_set_external_power_disable(bool state); */ bool furi_hal_subghz_get_external_power_disable(void); -/** If true - disable generation of random name and add timestamp to filenames instead - */ -void furi_hal_subghz_set_timestamp_file_names(bool state); - -/** Get the current state of the timestamp instead of random name flag - */ -bool furi_hal_subghz_get_timestamp_file_names(void); - /** Set what radio module we will be using */ void furi_hal_subghz_select_radio_type(SubGhzRadioType state);