0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-08-03 09:36:32 +03:00

user TX power setting

This commit is contained in:
OneOfEleven
2023-11-24 08:16:38 +00:00
parent 4d3a0ff635
commit 907aa00f07
13 changed files with 166 additions and 138 deletions

View File

@@ -120,6 +120,13 @@ int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
*pMax = ARRAY_SIZE(g_sub_menu_mem_disp) - 1;
break;
#ifdef ENABLE_TX_POWER_LOW_USER
case MENU_TX_POWER_LOW_USER:
*pMin = 0;
*pMax = 15;
break;
#endif
case MENU_TX_POWER:
*pMin = 0;
*pMax = ARRAY_SIZE(g_sub_menu_tx_power) - 1;
@@ -430,6 +437,13 @@ void MENU_AcceptSetting(void)
g_request_save_channel = 1;
return;
#ifdef ENABLE_TX_POWER_LOW_USER
case MENU_TX_POWER_LOW_USER:
g_tx_vfo->channel.tx_pwr_user = g_sub_menu_selection;
g_request_save_channel = 1;
break;
#endif
case MENU_TX_POWER:
g_tx_vfo->channel.tx_power = g_sub_menu_selection;
g_request_save_channel = 1;
@@ -905,7 +919,7 @@ void MENU_AcceptSetting(void)
RADIO_ConfigureTXPower(g_current_vfo);
if (g_current_function == FUNCTION_TRANSMIT && g_current_display_screen != DISPLAY_AIRCOPY)
BK4819_SetupPowerAmplifier(g_current_vfo->txp_calculated_setting, g_current_vfo->p_tx->frequency);
BK4819_SetupPowerAmplifier(g_current_vfo->txp_reg_value, g_current_vfo->p_tx->frequency);
}
break;
#endif
@@ -1008,6 +1022,12 @@ void MENU_ShowCurrentSetting(void)
g_sub_menu_selection = FREQUENCY_get_step_index(STEP_FREQ_TABLE[g_tx_vfo->channel.step_setting]);
break;
#ifdef ENABLE_TX_POWER_LOW_USER
case MENU_TX_POWER_LOW_USER:
g_sub_menu_selection = g_tx_vfo->channel.tx_pwr_user;
break;
#endif
case MENU_TX_POWER:
g_sub_menu_selection = g_tx_vfo->channel.tx_power;
break;