diff --git a/applications/main/subghz/scenes/subghz_scene_radio_settings.c b/applications/main/subghz/scenes/subghz_scene_radio_settings.c index f293bc86c..270d999c0 100644 --- a/applications/main/subghz/scenes/subghz_scene_radio_settings.c +++ b/applications/main/subghz/scenes/subghz_scene_radio_settings.c @@ -20,12 +20,6 @@ const char* const timestamp_names_text[TIMESTAMP_NAMES_COUNT] = { "ON", }; -#define EXT_MOD_POWER_AMP_COUNT 2 -const char* const ext_mod_power_amp_text[EXT_MOD_POWER_AMP_COUNT] = { - "OFF", - "ON", -}; - #define DEBUG_P_COUNT 2 const char* const debug_pin_text[DEBUG_P_COUNT] = { "OFF", @@ -104,27 +98,6 @@ static void subghz_scene_receiver_config_set_debug_counter(VariableItem* item) { furi_hal_subghz_set_rolling_counter_mult(debug_counter_val[index]); } -static void subghz_scene_reciever_config_set_ext_mod_power_amp_text(VariableItem* item) { - SubGhz* subghz = variable_item_get_context(item); - uint8_t index = variable_item_get_current_value_index(item); - - variable_item_set_current_value_text(item, ext_mod_power_amp_text[index]); - - subghz->last_settings->external_module_power_amp = index == 1; - - // Set globally in furi hal - furi_hal_subghz_set_ext_power_amp(subghz->last_settings->external_module_power_amp); - - subghz_last_settings_save(subghz->last_settings); - - // reinit external device - const SubGhzRadioDeviceType current = subghz_txrx_radio_device_get(subghz->txrx); - if(current != SubGhzRadioDeviceTypeInternal) { - subghz_txrx_radio_device_set(subghz->txrx, SubGhzRadioDeviceTypeInternal); - subghz_txrx_radio_device_set(subghz->txrx, current); - } -} - static void subghz_scene_receiver_config_set_gps(VariableItem* item) { SubGhz* subghz = variable_item_get_context(item); uint8_t index = variable_item_get_current_value_index(item); @@ -194,16 +167,6 @@ void subghz_scene_radio_settings_on_enter(void* context) { variable_item_set_current_value_index(item, value_index); variable_item_set_current_value_text(item, radio_device_text[value_index]); - item = variable_item_list_add( - variable_item_list, - "Ext Power Amp", - EXT_MOD_POWER_AMP_COUNT, - subghz_scene_reciever_config_set_ext_mod_power_amp_text, - subghz); - value_index = subghz->last_settings->external_module_power_amp ? 1 : 0; - variable_item_set_current_value_index(item, value_index); - variable_item_set_current_value_text(item, ext_mod_power_amp_text[value_index]); - item = variable_item_list_add( variable_item_list, "GPS Baudrate", diff --git a/applications/main/subghz/subghz_extended_freq.c b/applications/main/subghz/subghz_extended_freq.c index d7f41a25b..eebcc5856 100644 --- a/applications/main/subghz/subghz_extended_freq.c +++ b/applications/main/subghz/subghz_extended_freq.c @@ -26,8 +26,5 @@ void subghz_extended_freq() { SubGhzLastSettings* last_settings = subghz_last_settings_alloc(); subghz_last_settings_load(last_settings, 0); - // Set globally in furi hal - furi_hal_subghz_set_ext_power_amp(last_settings->external_module_power_amp); - subghz_last_settings_free(last_settings); } diff --git a/applications/main/subghz/subghz_last_settings.h b/applications/main/subghz/subghz_last_settings.h index 3c03c0f11..6c0842a4e 100644 --- a/applications/main/subghz/subghz_last_settings.h +++ b/applications/main/subghz/subghz_last_settings.h @@ -20,11 +20,6 @@ typedef struct { uint32_t preset_index; // AKA Modulation uint32_t frequency_analyzer_feedback_level; float frequency_analyzer_trigger; - // TODO not using but saved so as not to change the version - bool external_module_enabled; - bool external_module_power_5v_disable; - bool external_module_power_amp; - // saved so as not to change the version bool protocol_file_names; uint32_t gps_baudrate; bool enable_hopping; diff --git a/lib/subghz/devices/devices.c b/lib/subghz/devices/devices.c index 729ccca80..25e522343 100644 --- a/lib/subghz/devices/devices.c +++ b/lib/subghz/devices/devices.c @@ -35,7 +35,7 @@ bool subghz_devices_begin(const SubGhzDevice* device) { SubGhzDeviceConf conf = { .ver = 1, .extended_range = false, // TODO - .power_amp = furi_hal_subghz_get_ext_power_amp(), + .power_amp = true, }; ret = device->interconnect->begin(&conf); diff --git a/targets/f7/api_symbols.csv b/targets/f7/api_symbols.csv index be6c7fc92..8cb66c98b 100644 --- a/targets/f7/api_symbols.csv +++ b/targets/f7/api_symbols.csv @@ -1643,7 +1643,6 @@ Function,-,furi_hal_subghz_dump_state,void, Function,+,furi_hal_subghz_flush_rx,void, Function,+,furi_hal_subghz_flush_tx,void, Function,+,furi_hal_subghz_get_data_gpio,const GpioPin*, -Function,+,furi_hal_subghz_get_ext_power_amp,_Bool, Function,+,furi_hal_subghz_get_lqi,uint8_t, Function,+,furi_hal_subghz_get_rolling_counter_mult,int8_t, Function,+,furi_hal_subghz_get_rssi,float, @@ -1661,7 +1660,6 @@ Function,+,furi_hal_subghz_reset,void, Function,+,furi_hal_subghz_rx,void, Function,+,furi_hal_subghz_rx_pipe_not_empty,_Bool, Function,+,furi_hal_subghz_set_async_mirror_pin,void,const GpioPin* -Function,+,furi_hal_subghz_set_ext_power_amp,void,_Bool 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 diff --git a/targets/f7/furi_hal/furi_hal_subghz.c b/targets/f7/furi_hal/furi_hal_subghz.c index 15f2ad01a..1350bcd58 100644 --- a/targets/f7/furi_hal/furi_hal_subghz.c +++ b/targets/f7/furi_hal/furi_hal_subghz.c @@ -52,7 +52,6 @@ typedef struct { const GpioPin* async_mirror_pin; int8_t rolling_counter_mult; - bool ext_power_amp : 1; bool extended_frequency_i : 1; bool bypass_region : 1; } FuriHalSubGhz; @@ -62,7 +61,6 @@ volatile FuriHalSubGhz furi_hal_subghz = { .regulation = SubGhzRegulationTxRx, .async_mirror_pin = NULL, .rolling_counter_mult = 1, - .ext_power_amp = false, .extended_frequency_i = false, .bypass_region = false, }; @@ -83,14 +81,6 @@ void furi_hal_subghz_set_bypass_region(bool enabled) { furi_hal_subghz.bypass_region = enabled; } -void furi_hal_subghz_set_ext_power_amp(bool enabled) { - furi_hal_subghz.ext_power_amp = enabled; -} - -bool furi_hal_subghz_get_ext_power_amp(void) { - return furi_hal_subghz.ext_power_amp; -} - void furi_hal_subghz_set_async_mirror_pin(const GpioPin* pin) { furi_hal_subghz.async_mirror_pin = pin; } diff --git a/targets/f7/furi_hal/furi_hal_subghz.h b/targets/f7/furi_hal/furi_hal_subghz.h index 68c040928..10d89947a 100644 --- a/targets/f7/furi_hal/furi_hal_subghz.h +++ b/targets/f7/furi_hal/furi_hal_subghz.h @@ -238,54 +238,7 @@ bool furi_hal_subghz_is_async_tx_complete(void); */ void furi_hal_subghz_stop_async_tx(void); -// /** Initialize and switch to power save mode Used by internal API-HAL -// * initialization routine Can be used to reinitialize device to safe state and -// * send it to sleep -// * @return true if initialisation is successfully -// */ -// bool furi_hal_subghz_init_check(void); - -// /** Switching between internal and external radio -// * @param state SubGhzRadioInternal or SubGhzRadioExternal -// * @return true if switching is successful -// */ -// bool furi_hal_subghz_init_radio_type(SubGhzRadioType state); - -// /** Get current radio -// * @return SubGhzRadioInternal or SubGhzRadioExternal -// */ -// SubGhzRadioType furi_hal_subghz_get_radio_type(void); - -// /** Check for a radio module -// * @return true if check is successful -// */ -// bool furi_hal_subghz_check_radio(void); - -// /** Turn on the power of the external radio module -// * @return true if power-up is successful -// */ -// bool furi_hal_subghz_enable_ext_power(void); - -// /** Turn off the power of the external radio module -// */ -// void furi_hal_subghz_disable_ext_power(void); - -// /** If true - disable 5v power of the external radio module -// */ -// void furi_hal_subghz_set_external_power_disable(bool state); - -// /** Get the current state of the external power disable flag -// */ -// bool furi_hal_subghz_get_external_power_disable(void); - -// /** Set what radio module we will be using -// */ -// void furi_hal_subghz_select_radio_type(SubGhzRadioType state); - -// External CC1101 Ebytes power amplifier control -void furi_hal_subghz_set_ext_power_amp(bool enabled); - -bool furi_hal_subghz_get_ext_power_amp(void); +// External CC1101 Ebytes power amplifier control is now enabled by default #ifdef __cplusplus }