mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-19 22:58:04 +03:00
Add DO7OO's update - hide LMH when TX not allowed
This commit is contained in:
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
37
ui/main.c
37
ui/main.c
@ -836,22 +836,29 @@ void UI_DisplayMain(void)
|
|||||||
}
|
}
|
||||||
UI_PrintStringSmall(str, LCD_WIDTH + 24, 0, line + 1);
|
UI_PrintStringSmall(str, LCD_WIDTH + 24, 0, line + 1);
|
||||||
|
|
||||||
if (state == VFO_STATE_NORMAL || state == VFO_STATE_ALARM)
|
#ifdef ENABLE_TX_WHEN_AM
|
||||||
{ // show the TX power
|
if (state == VFO_STATE_NORMAL || state == VFO_STATE_ALARM)
|
||||||
const char pwr_list[] = "LMH";
|
#else
|
||||||
const unsigned int i = g_eeprom.vfo_info[vfo_num].output_power;
|
if ((state == VFO_STATE_NORMAL || state == VFO_STATE_ALARM) && !g_current_vfo->am_mode) // not allowed to TX if in AM mode
|
||||||
str[0] = (i < ARRAY_SIZE(pwr_list)) ? pwr_list[i] : '\0';
|
#endif
|
||||||
str[1] = '\0';
|
{
|
||||||
UI_PrintStringSmall(str, LCD_WIDTH + 46, 0, line + 1);
|
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)
|
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
|
{ // show the TX offset symbol
|
||||||
const char dir_list[] = "\0+-";
|
const char dir_list[] = "\0+-";
|
||||||
const unsigned int i = g_eeprom.vfo_info[vfo_num].tx_offset_freq_dir;
|
const unsigned int i = g_eeprom.vfo_info[vfo_num].tx_offset_freq_dir;
|
||||||
str[0] = (i < sizeof(dir_list)) ? dir_list[i] : '?';
|
str[0] = (i < sizeof(dir_list)) ? dir_list[i] : '?';
|
||||||
str[1] = '\0';
|
str[1] = '\0';
|
||||||
UI_PrintStringSmall(str, LCD_WIDTH + 54, 0, line + 1);
|
UI_PrintStringSmall(str, LCD_WIDTH + 54, 0, line + 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// show the TX/RX reverse symbol
|
// show the TX/RX reverse symbol
|
||||||
|
Reference in New Issue
Block a user