0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-18 22:29:50 +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

@ -895,7 +895,7 @@ void UI_DisplayMain(void)
}
x += smallest_char_spacing * 4;
if (g_vfo_info[vfo_num].channel.compand)
if (g_vfo_info[vfo_num].channel.compand != COMPAND_OFF)
UI_PrintStringSmallest("C", x, (line + 0) * 8, false, true);
//x += smallest_char_spacing * 1;
}
@ -909,7 +909,7 @@ void UI_DisplayMain(void)
str[0] = 'I'; // frequency is in the ignore list
#endif
if (g_vfo_info[vfo_num].channel.compand)
if (g_vfo_info[vfo_num].channel.compand != COMPAND_OFF)
str[1] = 'C'; // compander is enabled
UI_PrintStringSmall(str, LCD_WIDTH - (7 * 2), 0, line + 1);
@ -928,7 +928,7 @@ void UI_DisplayMain(void)
if (is_freq_chan && freq_in_channel <= USER_CHANNEL_LAST)
str[1] = 'F'; // this VFO frequency is also found in a channel
if (g_vfo_info[vfo_num].channel.compand)
if (g_vfo_info[vfo_num].channel.compand != COMPAND_OFF)
str[2] = 'C'; // compander is enabled
UI_PrintStringSmall(str, LCD_WIDTH - (7 * 3), 0, line + 1);
@ -990,7 +990,11 @@ void UI_DisplayMain(void)
if (FREQUENCY_tx_freq_check(g_vfo_info[vfo_num].p_tx->frequency) == 0)
{
// show the TX power
const char pwr_list[] = "LMH";
#ifdef ENABLE_TX_POWER_LOW_USER
const char pwr_list[] = "UMH"; // user, midium, high
#else
const char pwr_list[] = "LMH"; // low, medium, high
#endif
const unsigned int i = g_vfo_info[vfo_num].channel.tx_power;
str[0] = (i < ARRAY_SIZE(pwr_list)) ? pwr_list[i] : '\0';
str[1] = '\0';

View File

@ -53,6 +53,9 @@ const t_menu_item g_menu_list[] =
{"STEP", VOICE_ID_FREQUENCY_STEP, MENU_STEP },
{"W/N", VOICE_ID_CHANNEL_BANDWIDTH, MENU_BANDWIDTH },
{"Tx PWR", VOICE_ID_POWER, MENU_TX_POWER }, // was "TXP"
#ifdef ENABLE_TX_POWER_LOW_USER
{"TxPUSR", VOICE_ID_POWER, MENU_TX_POWER_LOW_USER },
#endif
{"Rx DCS", VOICE_ID_DCS, MENU_RX_CDCSS }, // was "R_DCS"
{"Rx CTS", VOICE_ID_CTCSS, MENU_RX_CTCSS }, // was "R_CTCS"
{"Tx DCS", VOICE_ID_DCS, MENU_TX_CDCSS }, // was "T_DCS"
@ -192,7 +195,11 @@ const char g_sub_menu_mod_mode[3][4] =
const char g_sub_menu_tx_power[3][7] =
{
"LOW",
#ifdef ENABLE_TX_POWER_LOW_USER
"USER",
#else
"LOW",
#endif
"MEDIUM",
"HIGH"
};
@ -610,6 +617,17 @@ void UI_DisplayMenu(void)
channel_setting = true;
break;
#ifdef ENABLE_TX_POWER_LOW_USER
case MENU_TX_POWER_LOW_USER:
// sprintf(str, "%u", 8 + (g_sub_menu_selection * 2));
sprintf(str, "%u", g_sub_menu_selection);
// if (g_current_function == FUNCTION_TRANSMIT && g_current_display_screen != DISPLAY_AIRCOPY)
// BK4819_SetupPowerAmplifier(8 + (g_sub_menu_selection * 2), g_current_vfo->p_tx->frequency);
break;
#endif
case MENU_RX_CDCSS:
case MENU_TX_CDCSS:
strcpy(str, "CDCSS\n");

View File

@ -45,6 +45,9 @@ enum
MENU_STEP,
MENU_BANDWIDTH,
MENU_TX_POWER,
#ifdef ENABLE_TX_POWER_LOW_USER
MENU_TX_POWER_LOW_USER,
#endif
MENU_RX_CDCSS,
MENU_RX_CTCSS,
MENU_TX_CDCSS,