diff --git a/applications/main/subghz/helpers/subghz_txrx.c b/applications/main/subghz/helpers/subghz_txrx.c index 46d0a7eef..1af603f40 100644 --- a/applications/main/subghz/helpers/subghz_txrx.c +++ b/applications/main/subghz/helpers/subghz_txrx.c @@ -109,10 +109,10 @@ void subghz_txrx_set_preset( } uint8_t* - subghz_txrx_set_tx_power(uint8_t* preset_data, size_t preset_data_size, uint32_t tx_power) { + subghz_txrx_set_tx_power(uint8_t* preset_data, size_t preset_data_size, uint8_t tx_power) { #define TX_POWER_OFFSET 7 #define TX_PRESET_POWER_COUNT 11 - const uint32_t tx_power_value[TX_PRESET_POWER_COUNT] = { + const uint8_t tx_power_value[TX_PRESET_POWER_COUNT] = { 0, 0xC0, 0xC5, @@ -708,7 +708,7 @@ const char* subghz_txrx_set_preset_internal( SubGhzTxRx* instance, uint32_t frequency, uint8_t index, - uint32_t tx_power) { + uint8_t tx_power) { furi_assert(instance); //Grab the prset name. diff --git a/applications/main/subghz/helpers/subghz_txrx.h b/applications/main/subghz/helpers/subghz_txrx.h index 259fddfc2..5d1cd8ee4 100644 --- a/applications/main/subghz/helpers/subghz_txrx.h +++ b/applications/main/subghz/helpers/subghz_txrx.h @@ -64,8 +64,7 @@ void subghz_txrx_set_preset( * @param preset_data_size Size of preset data * @param tx_power Menu Index of TX Power Setting. (Saves iterating in Config enter) */ -uint8_t* - subghz_txrx_set_tx_power(uint8_t* preset_data, size_t preset_data_size, uint32_t tx_power); +uint8_t* subghz_txrx_set_tx_power(uint8_t* preset_data, size_t preset_data_size, uint8_t tx_power); /** * Get name of preset @@ -377,4 +376,4 @@ const char* subghz_txrx_set_preset_internal( SubGhzTxRx* instance, uint32_t frequency, uint8_t index, - uint32_t tx_power); + uint8_t tx_power); diff --git a/applications/main/subghz/subghz_i.h b/applications/main/subghz/subghz_i.h index 01f3ccf2f..578995157 100644 --- a/applications/main/subghz/subghz_i.h +++ b/applications/main/subghz/subghz_i.h @@ -93,7 +93,7 @@ struct SubGhz { uint16_t idx_menu_chosen; SubGhzLoadTypeFile load_type_file; - uint32_t tx_power; + uint8_t tx_power; void* rpc_ctx; }; diff --git a/applications/main/subghz/subghz_last_settings.h b/applications/main/subghz/subghz_last_settings.h index e42ee868d..fcd6e1c1b 100644 --- a/applications/main/subghz/subghz_last_settings.h +++ b/applications/main/subghz/subghz_last_settings.h @@ -26,7 +26,7 @@ typedef struct { bool delete_old_signals; float hopping_threshold; bool leds_and_amp; - uint32_t tx_power; + uint8_t tx_power; } SubGhzLastSettings; SubGhzLastSettings* subghz_last_settings_alloc(void);