diff --git a/firmware.bin b/firmware.bin index cbaf5f6..63548fd 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index 345d7a3..6712c80 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ diff --git a/ui/main.c b/ui/main.c index ee2d6a9..7a95b20 100644 --- a/ui/main.c +++ b/ui/main.c @@ -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);