0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-06-20 15:08:37 +03:00

modulation mode update

This commit is contained in:
OneOfEleven
2023-10-30 01:51:41 +00:00
parent 0596b74719
commit ff642dfb8d
14 changed files with 95 additions and 38 deletions

View File

@ -838,9 +838,17 @@ void UI_DisplayMain(void)
// ************
str[0] = '\0';
if (g_eeprom.vfo_info[vfo_num].am_mode)
{ // show the AM symbol
strcpy(str, "AM");
if (g_eeprom.vfo_info[vfo_num].am_mode > 0)
{
//strcpy(str, g_sub_menu_mod_mode[g_eeprom.vfo_info[vfo_num].am_mode]);
switch (g_eeprom.vfo_info[vfo_num].am_mode)
{
default:
case 0: strcpy(str, "FM"); break;
case 1: strcpy(str, "AM"); break;
case 2: strcpy(str, "LS"); break;
case 3: strcpy(str, "US"); break;
}
}
else
{ // or show the CTCSS/DCS symbol
@ -855,7 +863,7 @@ 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_eeprom.vfo_info[vfo_num].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 == 0) // not allowed to TX if not in FM mode
#endif
{
if (FREQUENCY_tx_freq_check(g_eeprom.vfo_info[vfo_num].p_tx->frequency) == 0)
@ -949,7 +957,7 @@ void UI_DisplayMain(void)
#if defined(ENABLE_AM_FIX) && defined(ENABLE_AM_FIX_SHOW_DATA)
// show the AM-FIX debug data
if (rx && g_eeprom.vfo_info[g_eeprom.rx_vfo].am_mode && g_setting_am_fix)
if (rx && g_eeprom.vfo_info[g_eeprom.rx_vfo].am_mode > 0 && g_setting_am_fix)
{
g_center_line = CENTER_LINE_AM_FIX_DATA;
AM_fix_print_data(g_eeprom.rx_vfo, str);