mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-18 22:29:50 +03:00
ctcss phase stuff + fast manual freq up/dn scanning update
This commit is contained in:
43
ui/main.c
43
ui/main.c
@ -789,22 +789,35 @@ void UI_DisplayMain(void)
|
||||
}
|
||||
#else
|
||||
{
|
||||
strcpy(str, " ");
|
||||
|
||||
if (IS_FREQ_CHANNEL(g_eeprom.screen_channel[vfo_num]))
|
||||
const bool is_freq_chan = IS_FREQ_CHANNEL(g_eeprom.screen_channel[vfo_num]);
|
||||
const uint8_t freq_in_channel = g_eeprom.vfo_info[vfo_num].freq_in_channel;
|
||||
// const uint8_t freq_in_channel = BOARD_find_channel(frequency); // currently way to slow
|
||||
|
||||
// if (g_eeprom.vfo_info[vfo_num].compand)
|
||||
{
|
||||
//g_eeprom.vfo_info[vfo_num].freq_in_channel = BOARD_find_channel(frequency);
|
||||
if (g_eeprom.vfo_info[vfo_num].freq_in_channel <= USER_CHANNEL_LAST)
|
||||
strcpy(str, " ");
|
||||
|
||||
if (is_freq_chan && freq_in_channel <= USER_CHANNEL_LAST)
|
||||
{ // the channel number that contains this VFO frequency
|
||||
str[0] = 'F';
|
||||
// strcpy(str, "F");
|
||||
sprintf(str, "%03u", freq_in_channel);
|
||||
}
|
||||
|
||||
if (g_eeprom.vfo_info[vfo_num].compand)
|
||||
strcat(str, "C");
|
||||
|
||||
// UI_PrintStringSmall(str, LCD_WIDTH - (7 * 2), 0, line + 1);
|
||||
UI_PrintStringSmall(str, LCD_WIDTH - (7 * 4), 0, line + 1);
|
||||
}
|
||||
/* else
|
||||
{
|
||||
if (is_freq_chan && freq_in_channel <= USER_CHANNEL_LAST)
|
||||
{ // the channel number that contains this VFO frequency
|
||||
sprintf(str, "%03u", freq_in_channel);
|
||||
UI_PrintStringSmall(str, LCD_WIDTH - (7 * 3), 0, line + 1);
|
||||
}
|
||||
}
|
||||
|
||||
if (g_eeprom.vfo_info[vfo_num].compand)
|
||||
str[1] = 'C';
|
||||
|
||||
UI_PrintStringSmall(str, LCD_WIDTH - 1 - (6 * 2), 0, line + 1);
|
||||
}
|
||||
*/ }
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -941,7 +954,11 @@ void UI_DisplayMain(void)
|
||||
if (mdc1200_rx_ready_tick_500ms > 0)
|
||||
{
|
||||
g_center_line = CENTER_LINE_MDC1200;
|
||||
sprintf(str, "MDC1200 %02X %02X %04X", mdc1200_op, mdc1200_arg, mdc1200_unit_id);
|
||||
#ifdef ENABLE_MDC1200_SHOW_OP_ARG
|
||||
sprintf(str, "MDC1200 %02X %02X %04X", mdc1200_op, mdc1200_arg, mdc1200_unit_id);
|
||||
#else
|
||||
sprintf(str, "MDC1200 ID %04X", mdc1200_unit_id);
|
||||
#endif
|
||||
#ifdef ENABLE_SMALL_BOLD
|
||||
UI_PrintStringSmallBold(str, 2, 0, 3);
|
||||
#else
|
||||
|
12
ui/menu.c
12
ui/menu.c
@ -610,9 +610,9 @@ void UI_DisplayMenu(void)
|
||||
strcat(str, "OFF");
|
||||
else
|
||||
if (g_sub_menu_selection < 105)
|
||||
sprintf(str + strlen(str), "D%03oN", DCS_OPTIONS[g_sub_menu_selection - 1]);
|
||||
sprintf(str + strlen(str), "D%03oN", DCS_CODE_LIST[g_sub_menu_selection - 1]);
|
||||
else
|
||||
sprintf(str + strlen(str), "D%03oI", DCS_OPTIONS[g_sub_menu_selection - 105]);
|
||||
sprintf(str + strlen(str), "D%03oI", DCS_CODE_LIST[g_sub_menu_selection - 105]);
|
||||
break;
|
||||
|
||||
case MENU_RX_CTCSS:
|
||||
@ -634,23 +634,23 @@ void UI_DisplayMenu(void)
|
||||
pConfig->code_type = CODE_TYPE_NONE;
|
||||
pConfig->code = Code;
|
||||
|
||||
BK4819_ExitSubAu();
|
||||
BK4819_disable_sub_audible();
|
||||
}
|
||||
else
|
||||
{
|
||||
sprintf(str + strlen(str), "%u.%uHz", CTCSS_OPTIONS[g_sub_menu_selection - 1] / 10, CTCSS_OPTIONS[g_sub_menu_selection - 1] % 10);
|
||||
sprintf(str + strlen(str), "%u.%uHz", CTCSS_TONE_LIST[g_sub_menu_selection - 1] / 10, CTCSS_TONE_LIST[g_sub_menu_selection - 1] % 10);
|
||||
|
||||
pConfig->code_type = CODE_TYPE_CONTINUOUS_TONE;
|
||||
Code = g_sub_menu_selection - 1;
|
||||
pConfig->code = Code;
|
||||
|
||||
BK4819_SetCTCSSFrequency(CTCSS_OPTIONS[Code]);
|
||||
BK4819_set_CTCSS_freq(CTCSS_TONE_LIST[Code]);
|
||||
}
|
||||
#else
|
||||
if (g_sub_menu_selection == 0)
|
||||
strcat(str, "OFF");
|
||||
else
|
||||
sprintf(str + strlen(str), "%u.%uHz", CTCSS_OPTIONS[g_sub_menu_selection - 1] / 10, CTCSS_OPTIONS[g_sub_menu_selection - 1] % 10);
|
||||
sprintf(str + strlen(str), "%u.%uHz", CTCSS_TONE_LIST[g_sub_menu_selection - 1] / 10, CTCSS_TONE_LIST[g_sub_menu_selection - 1] % 10);
|
||||
#endif
|
||||
|
||||
break;
|
||||
|
@ -96,11 +96,11 @@ void UI_DisplaySearch(void)
|
||||
case CODE_TYPE_NONE:
|
||||
break;
|
||||
case CODE_TYPE_CONTINUOUS_TONE:
|
||||
sprintf(String, "CTCSS %u.%uHz", CTCSS_OPTIONS[g_search_css_result_code] / 10, CTCSS_OPTIONS[g_search_css_result_code] % 10);
|
||||
sprintf(String, "CTCSS %u.%uHz", CTCSS_TONE_LIST[g_search_css_result_code] / 10, CTCSS_TONE_LIST[g_search_css_result_code] % 10);
|
||||
break;
|
||||
case CODE_TYPE_DIGITAL:
|
||||
case CODE_TYPE_REVERSE_DIGITAL:
|
||||
sprintf(String, "CDCSS D%03oN", DCS_OPTIONS[g_search_css_result_code]);
|
||||
sprintf(String, "CDCSS D%03oN", DCS_CODE_LIST[g_search_css_result_code]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user