mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-18 22:29:50 +03:00
modulation mode update
This commit is contained in:
18
ui/main.c
18
ui/main.c
@ -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);
|
||||
|
11
ui/menu.c
11
ui/menu.c
@ -174,6 +174,14 @@ const unsigned int g_hidden_menu_count = 9;
|
||||
|
||||
// ***************************************************************************************
|
||||
|
||||
const char g_sub_menu_mod_mode[4][4] =
|
||||
{
|
||||
"FM",
|
||||
"AM",
|
||||
"LSB",
|
||||
"USB"
|
||||
};
|
||||
|
||||
const char g_sub_menu_tx_power[3][7] =
|
||||
{
|
||||
"LOW",
|
||||
@ -722,7 +730,8 @@ void UI_DisplayMenu(void)
|
||||
break;
|
||||
|
||||
case MENU_MOD_MODE:
|
||||
strcpy(str, (g_sub_menu_selection == 0) ? "FM" : "AM");
|
||||
// strcpy(str, (g_sub_menu_selection == 0) ? "FM" : "AM");
|
||||
strcpy(str, g_sub_menu_mod_mode[g_sub_menu_selection]);
|
||||
break;
|
||||
|
||||
#ifdef ENABLE_AM_FIX_TEST1
|
||||
|
@ -162,6 +162,7 @@ enum
|
||||
extern const t_menu_item g_menu_list[];
|
||||
extern uint8_t g_menu_list_sorted[];
|
||||
|
||||
extern const char g_sub_menu_mod_mode[4][4];
|
||||
extern const char g_sub_menu_tx_power[3][7];
|
||||
extern const char g_sub_menu_shift_dir[3][4];
|
||||
extern const char g_sub_menu_bandwidth[2][7];
|
||||
|
Reference in New Issue
Block a user