0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-18 22:29:50 +03:00
This commit is contained in:
OneOfEleven
2023-10-27 16:23:33 +01:00
parent a2b78a7b99
commit eb03123666
7 changed files with 126 additions and 160 deletions

View File

@ -853,25 +853,26 @@ void UI_DisplayMain(void)
#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
if ((state == VFO_STATE_NORMAL || state == VFO_STATE_ALARM) && !g_eeprom.vfo_info[vfo_num].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
if (FREQUENCY_tx_freq_check(g_eeprom.vfo_info[vfo_num].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);
}
}
}