mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 14:21:25 +03:00
added compile option for showing a frequencies channel
This commit is contained in:
parent
3779c5a36b
commit
88141810cb
4
Makefile
4
Makefile
@ -42,6 +42,7 @@ ENABLE_MDC1200_SIDE_BEEP := 1
|
||||
ENABLE_PWRON_PASSWORD := 0
|
||||
ENABLE_RESET_AES_KEY := 0
|
||||
ENABLE_BIG_FREQ := 0
|
||||
ENABLE_SHOW_FREQS_CHAN := 1
|
||||
# smaa bolf 580 B
|
||||
ENABLE_SMALL_BOLD := 1
|
||||
# smallest font 2 kB
|
||||
@ -325,6 +326,9 @@ endif
|
||||
ifeq ($(ENABLE_BIG_FREQ),1)
|
||||
CFLAGS += -DENABLE_BIG_FREQ
|
||||
endif
|
||||
ifeq ($(ENABLE_SHOW_FREQS_CHAN),1)
|
||||
CFLAGS += -DENABLE_SHOW_FREQS_CHAN
|
||||
endif
|
||||
ifeq ($(ENABLE_SMALL_BOLD),1)
|
||||
CFLAGS += -DENABLE_SMALL_BOLD
|
||||
endif
|
||||
|
@ -64,6 +64,7 @@ ENABLE_MDC1200_SIDE_BEEP := 1 enable short side tone/beep when MDC
|
||||
ENABLE_PWRON_PASSWORD := 0 include power-on password code
|
||||
ENABLE_RESET_AES_KEY := 1 '1' = reset/clear the AES key stored in the eeprom (only if it's set)
|
||||
ENABLE_BIG_FREQ := 0 big font frequencies (like original QS firmware)
|
||||
ENABLE_SHOW_FREQS_CHAN := 1 show the channel name under the frequency if the frequency is found in a channel
|
||||
ENABLE_SMALL_BOLD := 1 bold channel name/no. (when name + freq channel display mode)
|
||||
ENABLE_TRIM_TRAILING_ZEROS := 1 trim away any trailing zeros on frequencies
|
||||
ENABLE_KEEP_MEM_NAME := 1 maintain channel name when (re)saving memory channel
|
||||
|
38
ui/main.c
38
ui/main.c
@ -726,24 +726,26 @@ void UI_DisplayMain(void)
|
||||
NUMBER_trim_trailing_zeros(str);
|
||||
#endif
|
||||
|
||||
//g_vfo_info[vfo_num].freq_in_channel = SETTINGS_find_channel(frequency);
|
||||
if (chan <= USER_CHANNEL_LAST)
|
||||
{ // the frequency has a channel - show the channel name below the frequency
|
||||
|
||||
// frequency
|
||||
#ifdef ENABLE_SMALL_BOLD
|
||||
UI_PrintStringSmallBold(str, x + 4, 0, line + 0);
|
||||
#else
|
||||
UI_PrintStringSmall(str, x + 4, 0, line + 0);
|
||||
#endif
|
||||
|
||||
// name
|
||||
SETTINGS_fetch_channel_name(str, chan);
|
||||
if (str[0] == 0)
|
||||
sprintf(str, "CH-%03u", 1 + chan);
|
||||
UI_PrintStringSmall(str, x + 4, 0, line + 1);
|
||||
}
|
||||
else
|
||||
#ifdef ENABLE_SHOW_FREQS_CHAN
|
||||
//g_vfo_info[vfo_num].freq_in_channel = SETTINGS_find_channel(frequency);
|
||||
if (chan <= USER_CHANNEL_LAST)
|
||||
{ // the frequency has a channel - show the channel name below the frequency
|
||||
|
||||
// frequency
|
||||
#ifdef ENABLE_SMALL_BOLD
|
||||
UI_PrintStringSmallBold(str, x + 4, 0, line + 0);
|
||||
#else
|
||||
UI_PrintStringSmall(str, x + 4, 0, line + 0);
|
||||
#endif
|
||||
|
||||
// name
|
||||
SETTINGS_fetch_channel_name(str, chan);
|
||||
if (str[0] == 0)
|
||||
sprintf(str, "CH-%03u", 1 + chan);
|
||||
UI_PrintStringSmall(str, x + 4, 0, line + 1);
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{ // show the frequency in the main font
|
||||
UI_PrintString(str, x, 0, line, 8);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user