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

ctcss phase stuff + fast manual freq up/dn scanning update

This commit is contained in:
OneOfEleven
2023-10-31 22:02:54 +00:00
parent 2522b4184a
commit 010ee10516
20 changed files with 532 additions and 552 deletions

View File

@ -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