mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-19 06:39:49 +03:00
MDC1200 FSK update
This commit is contained in:
54
ui/main.c
54
ui/main.c
@ -398,6 +398,32 @@ void UI_update_rssi(const int16_t rssi, const int vfo)
|
||||
|
||||
// ***************************************************************************
|
||||
|
||||
void big_freq(const uint32_t frequency, const unsigned int x, const unsigned int line)
|
||||
{
|
||||
char str[9];
|
||||
|
||||
NUMBER_ToDigits(frequency, str);
|
||||
|
||||
// show the main large frequency digits
|
||||
UI_DisplayFrequency(str, x, line, false, false);
|
||||
|
||||
// show the remaining 2 small frequency digits
|
||||
#ifdef ENABLE_TRIM_TRAILING_ZEROS
|
||||
{
|
||||
unsigned int small_num = 2;
|
||||
if (str[7] == 0)
|
||||
{
|
||||
small_num--;
|
||||
if (str[6] == 0)
|
||||
small_num--;
|
||||
}
|
||||
UI_Displaysmall_digits(small_num, str + 6, x + 81, line + 1, true);
|
||||
}
|
||||
#else
|
||||
UI_Displaysmall_digits(2, str + 6, x + 81, line + 1, true);
|
||||
#endif
|
||||
}
|
||||
|
||||
void UI_DisplayMain(void)
|
||||
{
|
||||
#ifndef ENABLE_BIG_FREQ
|
||||
@ -663,28 +689,7 @@ void UI_DisplayMain(void)
|
||||
case MDF_FREQUENCY: // just channel frequency
|
||||
|
||||
#ifdef ENABLE_BIG_FREQ
|
||||
|
||||
NUMBER_ToDigits(frequency, str);
|
||||
|
||||
// show the main large frequency digits
|
||||
UI_DisplayFrequency(str, x, line, false, false);
|
||||
|
||||
// show the remaining 2 small frequency digits
|
||||
#ifdef ENABLE_TRIM_TRAILING_ZEROS
|
||||
{
|
||||
unsigned int small_num = 2;
|
||||
if (str[7] == 0)
|
||||
{
|
||||
small_num--;
|
||||
if (str[6] == 0)
|
||||
small_num--;
|
||||
}
|
||||
UI_Displaysmall_digits(small_num, str + 6, x + 81, line + 1, true);
|
||||
}
|
||||
#else
|
||||
UI_Displaysmall_digits(2, str + 6, x + 81, line + 1, true);
|
||||
#endif
|
||||
|
||||
big_freq(frequency, x, line);
|
||||
#else
|
||||
// show the frequency in the main font
|
||||
sprintf(str, "%03u.%05u", frequency / 100000, frequency % 100000);
|
||||
@ -743,7 +748,8 @@ void UI_DisplayMain(void)
|
||||
// if (IS_FREQ_CHANNEL(g_eeprom.screen_channel[vfo_num]))
|
||||
{ // frequency mode
|
||||
#ifdef ENABLE_BIG_FREQ
|
||||
|
||||
big_freq(frequency, x, line);
|
||||
/*
|
||||
NUMBER_ToDigits(frequency, str); // 8 digits
|
||||
|
||||
// show the main large frequency digits
|
||||
@ -764,7 +770,7 @@ void UI_DisplayMain(void)
|
||||
#else
|
||||
UI_Displaysmall_digits(2, str + 6, x + 81, line + 1, true);
|
||||
#endif
|
||||
|
||||
*/
|
||||
#else
|
||||
// show the frequency in the main font
|
||||
|
||||
|
Reference in New Issue
Block a user