0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-28 06:11:24 +03:00

Add DO7OO's update - hide LMH when TX not allowed

This commit is contained in:
OneOfEleven 2023-10-25 21:24:40 +01:00
parent eec77fb93c
commit 28f78cfcb6
3 changed files with 24 additions and 17 deletions

Binary file not shown.

Binary file not shown.

View File

@ -836,24 +836,31 @@ void UI_DisplayMain(void)
}
UI_PrintStringSmall(str, LCD_WIDTH + 24, 0, line + 1);
if (state == VFO_STATE_NORMAL || state == VFO_STATE_ALARM)
{ // show the TX power
const char pwr_list[] = "LMH";
const unsigned int i = g_eeprom.vfo_info[vfo_num].output_power;
str[0] = (i < ARRAY_SIZE(pwr_list)) ? pwr_list[i] : '\0';
str[1] = '\0';
UI_PrintStringSmall(str, LCD_WIDTH + 46, 0, line + 1);
#ifdef ENABLE_TX_WHEN_AM
if (state == VFO_STATE_NORMAL || state == VFO_STATE_ALARM)
#else
if ((state == VFO_STATE_NORMAL || state == VFO_STATE_ALARM) && !g_current_vfo->am_mode) // not allowed to TX if in AM mode
#endif
{
if (FREQUENCY_tx_freq_check(g_current_vfo->p_tx->frequency) == 0)
{ // show the TX power
const char pwr_list[] = "LMH";
const unsigned int i = g_eeprom.vfo_info[vfo_num].output_power;
str[0] = (i < ARRAY_SIZE(pwr_list)) ? pwr_list[i] : '\0';
str[1] = '\0';
UI_PrintStringSmall(str, LCD_WIDTH + 46, 0, line + 1);
}
if (g_eeprom.vfo_info[vfo_num].freq_config_rx.frequency != g_eeprom.vfo_info[vfo_num].freq_config_tx.frequency)
{ // show the TX offset symbol
const char dir_list[] = "\0+-";
const unsigned int i = g_eeprom.vfo_info[vfo_num].tx_offset_freq_dir;
str[0] = (i < sizeof(dir_list)) ? dir_list[i] : '?';
str[1] = '\0';
UI_PrintStringSmall(str, LCD_WIDTH + 54, 0, line + 1);
}
}
if (g_eeprom.vfo_info[vfo_num].freq_config_rx.frequency != g_eeprom.vfo_info[vfo_num].freq_config_tx.frequency)
{ // show the TX offset symbol
const char dir_list[] = "\0+-";
const unsigned int i = g_eeprom.vfo_info[vfo_num].tx_offset_freq_dir;
str[0] = (i < sizeof(dir_list)) ? dir_list[i] : '?';
str[1] = '\0';
UI_PrintStringSmall(str, LCD_WIDTH + 54, 0, line + 1);
}
// show the TX/RX reverse symbol
if (g_eeprom.vfo_info[vfo_num].frequency_reverse)
UI_PrintStringSmall("R", LCD_WIDTH + 62, 0, line + 1);