mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-05-18 16:01:18 +03:00
single VFO mode update
This commit is contained in:
parent
81242eaf3a
commit
c5035f7c49
7
Makefile
7
Makefile
@ -41,7 +41,8 @@ ENABLE_PWRON_PASSWORD := 0
|
|||||||
ENABLE_RESET_AES_KEY := 0
|
ENABLE_RESET_AES_KEY := 0
|
||||||
ENABLE_BIG_FREQ := 0
|
ENABLE_BIG_FREQ := 0
|
||||||
ENABLE_DTMF_LIVE_DECODER := 0
|
ENABLE_DTMF_LIVE_DECODER := 0
|
||||||
ENABLE_SHOW_FREQS_CHAN := 1
|
ENABLE_DTMF_TIMING_SETTINGS := 1
|
||||||
|
ENABLE_SHOW_FREQ_IN_CHAN := 1
|
||||||
# smaa bolf 580 B
|
# smaa bolf 580 B
|
||||||
ENABLE_SMALL_BOLD := 0
|
ENABLE_SMALL_BOLD := 0
|
||||||
# smallest font 2 kB
|
# smallest font 2 kB
|
||||||
@ -335,8 +336,8 @@ endif
|
|||||||
ifeq ($(ENABLE_DTMF_LIVE_DECODER),1)
|
ifeq ($(ENABLE_DTMF_LIVE_DECODER),1)
|
||||||
CFLAGS += -DENABLE_DTMF_LIVE_DECODER
|
CFLAGS += -DENABLE_DTMF_LIVE_DECODER
|
||||||
endif
|
endif
|
||||||
ifeq ($(ENABLE_SHOW_FREQS_CHAN),1)
|
ifeq ($(ENABLE_SHOW_FREQ_IN_CHAN),1)
|
||||||
CFLAGS += -DENABLE_SHOW_FREQS_CHAN
|
CFLAGS += -DENABLE_SHOW_FREQ_IN_CHAN
|
||||||
endif
|
endif
|
||||||
ifeq ($(ENABLE_SMALL_BOLD),1)
|
ifeq ($(ENABLE_SMALL_BOLD),1)
|
||||||
CFLAGS += -DENABLE_SMALL_BOLD
|
CFLAGS += -DENABLE_SMALL_BOLD
|
||||||
|
@ -65,7 +65,8 @@ 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_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_BIG_FREQ := 0 big font frequencies (like original QS firmware)
|
||||||
ENABLE_DTMF_LIVE_DECODER := 0 enable the live DTMF display/decoder .. adds a menu option
|
ENABLE_DTMF_LIVE_DECODER := 0 enable the live DTMF display/decoder .. adds a menu option
|
||||||
ENABLE_SHOW_FREQS_CHAN := 0 show the channel name under the frequency if the frequency is found in a channel
|
ENABLE_DTMF_TIMING_SETTINGS := 0 enable the DTMF timing settings in the menu
|
||||||
|
ENABLE_SHOW_FREQ_IN_CHAN := 0 indicate if frequency found in a channel
|
||||||
ENABLE_SMALL_BOLD := 0 bold channel name/no. (when name + freq channel display mode)
|
ENABLE_SMALL_BOLD := 0 bold channel name/no. (when name + freq channel display mode)
|
||||||
ENABLE_TRIM_TRAILING_ZEROS := 0 trim away any trailing zeros on frequencies
|
ENABLE_TRIM_TRAILING_ZEROS := 0 trim away any trailing zeros on frequencies
|
||||||
ENABLE_WIDE_RX := 1 full 18MHz to 1300MHz RX (though front-end/PA not designed for full range)
|
ENABLE_WIDE_RX := 1 full 18MHz to 1300MHz RX (though front-end/PA not designed for full range)
|
||||||
|
56
app/menu.c
56
app/menu.c
@ -354,10 +354,22 @@ int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
|
|||||||
*pMax = DTMF_HOLD_MAX;
|
*pMax = DTMF_HOLD_MAX;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_DTMF_PRE:
|
#ifdef ENABLE_DTMF_TIMING_SETTINGS
|
||||||
*pMin = 3;
|
case MENU_DTMF_PRE:
|
||||||
*pMax = 99;
|
*pMin = 3;
|
||||||
break;
|
*pMax = 99;
|
||||||
|
break;
|
||||||
|
|
||||||
|
// MENU_DTMF_1ST_PERSIST,
|
||||||
|
// MENU_DTMF_HASH_PERSIST,
|
||||||
|
// MENU_DTMF_PERSIST,
|
||||||
|
// MENU_DTMF_INTERVAL,
|
||||||
|
|
||||||
|
// g_eeprom.config.setting.dtmf.first_code_persist_time = (g_eeprom.config.setting.dtmf.first_code_persist_time < 8 || g_eeprom.config.setting.dtmf.first_code_persist_time > 20) ? 10 : g_eeprom.config.setting.dtmf.first_code_persist_time;
|
||||||
|
// g_eeprom.config.setting.dtmf.hash_code_persist_time = (g_eeprom.config.setting.dtmf.hash_code_persist_time < 8 || g_eeprom.config.setting.dtmf.hash_code_persist_time > 20) ? 10 : g_eeprom.config.setting.dtmf.hash_code_persist_time;
|
||||||
|
// g_eeprom.config.setting.dtmf.code_persist_time = (g_eeprom.config.setting.dtmf.code_persist_time < 8 || g_eeprom.config.setting.dtmf.code_persist_time > 20) ? 10 : g_eeprom.config.setting.dtmf.code_persist_time;
|
||||||
|
// g_eeprom.config.setting.dtmf.code_interval_time = (g_eeprom.config.setting.dtmf.code_interval_time < 8 || g_eeprom.config.setting.dtmf.code_interval_time > 20) ? 10 : g_eeprom.config.setting.dtmf.code_interval_time;
|
||||||
|
#endif
|
||||||
|
|
||||||
case MENU_DTMF_LIST:
|
case MENU_DTMF_LIST:
|
||||||
*pMin = 1;
|
*pMin = 1;
|
||||||
@ -739,9 +751,21 @@ void MENU_AcceptSetting(void)
|
|||||||
g_eeprom.config.setting.dtmf.auto_reset_time = g_sub_menu_selection;
|
g_eeprom.config.setting.dtmf.auto_reset_time = g_sub_menu_selection;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_DTMF_PRE:
|
#ifdef ENABLE_DTMF_TIMING_SETTINGS
|
||||||
g_eeprom.config.setting.dtmf.preload_time = g_sub_menu_selection;
|
case MENU_DTMF_PRE:
|
||||||
break;
|
g_eeprom.config.setting.dtmf.preload_time = g_sub_menu_selection;
|
||||||
|
break;
|
||||||
|
|
||||||
|
// MENU_DTMF_1ST_PERSIST,
|
||||||
|
// MENU_DTMF_HASH_PERSIST,
|
||||||
|
// MENU_DTMF_PERSIST,
|
||||||
|
// MENU_DTMF_INTERVAL,
|
||||||
|
|
||||||
|
// g_eeprom.config.setting.dtmf.first_code_persist_time
|
||||||
|
// g_eeprom.config.setting.dtmf.hash_code_persist_time
|
||||||
|
// g_eeprom.config.setting.dtmf.code_persist_time
|
||||||
|
// g_eeprom.config.setting.dtmf.code_interval_time
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_MDC1200
|
#ifdef ENABLE_MDC1200
|
||||||
case MENU_MDC1200_MODE:
|
case MENU_MDC1200_MODE:
|
||||||
@ -1271,9 +1295,21 @@ void MENU_ShowCurrentSetting(void)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_DTMF_PRE:
|
#ifdef ENABLE_DTMF_TIMING_SETTINGS
|
||||||
g_sub_menu_selection = g_eeprom.config.setting.dtmf.preload_time;
|
case MENU_DTMF_PRE:
|
||||||
break;
|
g_sub_menu_selection = g_eeprom.config.setting.dtmf.preload_time;
|
||||||
|
break;
|
||||||
|
|
||||||
|
// MENU_DTMF_1ST_PERSIST,
|
||||||
|
// MENU_DTMF_HASH_PERSIST,
|
||||||
|
// MENU_DTMF_PERSIST,
|
||||||
|
// MENU_DTMF_INTERVAL,
|
||||||
|
|
||||||
|
// g_eeprom.config.setting.dtmf.first_code_persist_time
|
||||||
|
// g_eeprom.config.setting.dtmf.hash_code_persist_time
|
||||||
|
// g_eeprom.config.setting.dtmf.code_persist_time
|
||||||
|
// g_eeprom.config.setting.dtmf.code_interval_time
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_MDC1200
|
#ifdef ENABLE_MDC1200
|
||||||
case MENU_MDC1200_MODE:
|
case MENU_MDC1200_MODE:
|
||||||
|
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
12
settings.c
12
settings.c
@ -229,11 +229,13 @@ void SETTINGS_read_eeprom(void)
|
|||||||
g_eeprom.config.setting.dtmf.group_call_code = DTMF_ValidateCodes((char *)(&g_eeprom.config.setting.dtmf.group_call_code), 1) ? g_eeprom.config.setting.dtmf.group_call_code : '#';
|
g_eeprom.config.setting.dtmf.group_call_code = DTMF_ValidateCodes((char *)(&g_eeprom.config.setting.dtmf.group_call_code), 1) ? g_eeprom.config.setting.dtmf.group_call_code : '#';
|
||||||
g_eeprom.config.setting.dtmf.decode_response = (g_eeprom.config.setting.dtmf.decode_response < 4) ? g_eeprom.config.setting.dtmf.decode_response : DTMF_DEC_RESPONSE_RING;
|
g_eeprom.config.setting.dtmf.decode_response = (g_eeprom.config.setting.dtmf.decode_response < 4) ? g_eeprom.config.setting.dtmf.decode_response : DTMF_DEC_RESPONSE_RING;
|
||||||
g_eeprom.config.setting.dtmf.auto_reset_time = (g_eeprom.config.setting.dtmf.auto_reset_time <= DTMF_HOLD_MAX) ? g_eeprom.config.setting.dtmf.auto_reset_time : (g_eeprom.config.setting.dtmf.auto_reset_time >= DTMF_HOLD_MIN) ? g_eeprom.config.setting.dtmf.auto_reset_time : DTMF_HOLD_MAX;
|
g_eeprom.config.setting.dtmf.auto_reset_time = (g_eeprom.config.setting.dtmf.auto_reset_time <= DTMF_HOLD_MAX) ? g_eeprom.config.setting.dtmf.auto_reset_time : (g_eeprom.config.setting.dtmf.auto_reset_time >= DTMF_HOLD_MIN) ? g_eeprom.config.setting.dtmf.auto_reset_time : DTMF_HOLD_MAX;
|
||||||
g_eeprom.config.setting.dtmf.preload_time = (g_eeprom.config.setting.dtmf.preload_time < 10) ? g_eeprom.config.setting.dtmf.preload_time : 20;
|
#endif
|
||||||
g_eeprom.config.setting.dtmf.first_code_persist_time = (g_eeprom.config.setting.dtmf.first_code_persist_time < 10) ? g_eeprom.config.setting.dtmf.first_code_persist_time : 7;
|
g_eeprom.config.setting.dtmf.preload_time = (g_eeprom.config.setting.dtmf.preload_time < 3 || g_eeprom.config.setting.dtmf.preload_time > 99) ? 30 : g_eeprom.config.setting.dtmf.preload_time;
|
||||||
g_eeprom.config.setting.dtmf.hash_code_persist_time = (g_eeprom.config.setting.dtmf.hash_code_persist_time < 10) ? g_eeprom.config.setting.dtmf.hash_code_persist_time : 7;
|
g_eeprom.config.setting.dtmf.first_code_persist_time = (g_eeprom.config.setting.dtmf.first_code_persist_time < 8 || g_eeprom.config.setting.dtmf.first_code_persist_time > 20) ? 10 : g_eeprom.config.setting.dtmf.first_code_persist_time;
|
||||||
g_eeprom.config.setting.dtmf.code_persist_time = (g_eeprom.config.setting.dtmf.code_persist_time < 10) ? g_eeprom.config.setting.dtmf.code_persist_time : 7;
|
g_eeprom.config.setting.dtmf.hash_code_persist_time = (g_eeprom.config.setting.dtmf.hash_code_persist_time < 8 || g_eeprom.config.setting.dtmf.hash_code_persist_time > 20) ? 10 : g_eeprom.config.setting.dtmf.hash_code_persist_time;
|
||||||
g_eeprom.config.setting.dtmf.code_interval_time = (g_eeprom.config.setting.dtmf.code_interval_time < 10) ? g_eeprom.config.setting.dtmf.code_interval_time : 7;
|
g_eeprom.config.setting.dtmf.code_persist_time = (g_eeprom.config.setting.dtmf.code_persist_time < 8 || g_eeprom.config.setting.dtmf.code_persist_time > 20) ? 10 : g_eeprom.config.setting.dtmf.code_persist_time;
|
||||||
|
g_eeprom.config.setting.dtmf.code_interval_time = (g_eeprom.config.setting.dtmf.code_interval_time < 8 || g_eeprom.config.setting.dtmf.code_interval_time > 20) ? 10 : g_eeprom.config.setting.dtmf.code_interval_time;
|
||||||
|
#if 0
|
||||||
#ifdef ENABLE_KILL_REVIVE
|
#ifdef ENABLE_KILL_REVIVE
|
||||||
g_eeprom.config.setting.dtmf.permit_remote_kill = (g_eeprom.config.setting.dtmf.permit_remote_kill < 2) ? g_eeprom.config.setting.dtmf.permit_remote_kill : 0;
|
g_eeprom.config.setting.dtmf.permit_remote_kill = (g_eeprom.config.setting.dtmf.permit_remote_kill < 2) ? g_eeprom.config.setting.dtmf.permit_remote_kill : 0;
|
||||||
#else
|
#else
|
||||||
|
175
ui/main.c
175
ui/main.c
@ -649,6 +649,11 @@ const char *state_list[] = {"", "BUSY", "BAT LOW", "TX DISABLE", "TIMEOUT", "ALA
|
|||||||
uint8_t *p_line1 = g_frame_buffer[1];
|
uint8_t *p_line1 = g_frame_buffer[1];
|
||||||
char str[22];
|
char str[22];
|
||||||
|
|
||||||
|
#ifdef ENABLE_SHOW_FREQ_IN_CHAN
|
||||||
|
const uint8_t freq_in_channel = g_vfo_info[vfo_num].freq_in_channel;
|
||||||
|
//const uint8_t freq_in_channel = SETTINGS_find_channel(frequency); // was way to slow
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_ALARM
|
#ifdef ENABLE_ALARM
|
||||||
if (g_current_function == FUNCTION_TRANSMIT && g_alarm_state == ALARM_STATE_ALARM)
|
if (g_current_function == FUNCTION_TRANSMIT && g_alarm_state == ALARM_STATE_ALARM)
|
||||||
state = VFO_STATE_ALARM;
|
state = VFO_STATE_ALARM;
|
||||||
@ -812,41 +817,28 @@ const char *state_list[] = {"", "BUSY", "BAT LOW", "TX DISABLE", "TIMEOUT", "ALA
|
|||||||
big_freq(frequency, x, y);
|
big_freq(frequency, x, y);
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef ENABLE_SHOW_FREQS_CHAN
|
|
||||||
// const unsigned int chan = g_vfo_info[vfo_num].freq_in_channel;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
//sprintf(str, "%03u.%05u", frequency / 100000, frequency % 100000);
|
//sprintf(str, "%03u.%05u", frequency / 100000, frequency % 100000);
|
||||||
sprintf(str, "%u.%05u", frequency / 100000, frequency % 100000);
|
sprintf(str, "%u.%05u", frequency / 100000, frequency % 100000);
|
||||||
#ifdef ENABLE_TRIM_TRAILING_ZEROS
|
#ifdef ENABLE_TRIM_TRAILING_ZEROS
|
||||||
NUMBER_trim_trailing_zeros(str);
|
NUMBER_trim_trailing_zeros(str);
|
||||||
#endif
|
#endif
|
||||||
/*
|
|
||||||
#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_SHOW_FREQ_IN_CHAN
|
||||||
#ifdef ENABLE_SMALL_BOLD
|
UI_PrintString(str, x, 0, y, 8);
|
||||||
UI_PrintStringSmallBold(str, x + 4, 0, line + 0);
|
|
||||||
#else
|
|
||||||
UI_PrintStringSmall(str, x + 4, 0, y);
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// channel name, if not then channel number
|
if (IS_FREQ_CHANNEL(scrn_chan) && freq_in_channel <= USER_CHANNEL_LAST)
|
||||||
SETTINGS_fetch_channel_name(str, chan);
|
{
|
||||||
|
SETTINGS_fetch_channel_name(str, freq_in_channel);
|
||||||
if (str[0] == 0)
|
if (str[0] == 0)
|
||||||
//sprintf(str, "CH-%03u", 1 + chan);
|
//sprintf(str, "CH-%03u", 1 + freq_in_channel);
|
||||||
sprintf(str, "CH-%u", 1 + chan);
|
sprintf(str, "CH-%u", 1 + freq_in_channel);
|
||||||
UI_PrintStringSmall(str, x + 4, 0, y + 1);
|
//UI_PrintString(str, x, 0, y + 2, 8);
|
||||||
|
UI_PrintStringSmall(str, x, 0, y + 2);
|
||||||
}
|
}
|
||||||
else
|
#else
|
||||||
#endif
|
|
||||||
*/ { // show the frequency in the main font
|
|
||||||
// UI_PrintString(str, x, 0, y, 8);
|
|
||||||
UI_PrintString(str, x, 0, y + 1, 8);
|
UI_PrintString(str, x, 0, y + 1, 8);
|
||||||
}
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -868,41 +860,22 @@ const char *state_list[] = {"", "BUSY", "BAT LOW", "TX DISABLE", "TIMEOUT", "ALA
|
|||||||
}
|
}
|
||||||
|
|
||||||
{
|
{
|
||||||
const bool is_freq_chan = IS_FREQ_CHANNEL(scrn_chan);
|
strcpy(str, " ");
|
||||||
const uint8_t freq_in_channel = g_vfo_info[vfo_num].freq_in_channel;
|
/*
|
||||||
// const uint8_t freq_in_channel = SETTINGS_find_channel(frequency); // was way to slow
|
#ifdef ENABLE_SHOW_FREQ_IN_CHAN
|
||||||
|
if (IS_FREQ_CHANNEL(scrn_chan) && freq_in_channel <= USER_CHANNEL_LAST)
|
||||||
#ifdef ENABLE_SHOW_FREQS_CHAN
|
|
||||||
strcpy(str, " ");
|
|
||||||
|
|
||||||
if (is_freq_chan && freq_in_channel <= USER_CHANNEL_LAST)
|
|
||||||
sprintf(str, "%3u", 1 + freq_in_channel);
|
|
||||||
|
|
||||||
#ifdef ENABLE_SCAN_IGNORE_LIST
|
|
||||||
if (FI_freq_ignored(frequency) >= 0)
|
|
||||||
str[4] = 'I'; // frequency is in the ignore list
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (g_vfo_info[vfo_num].channel.compand != COMPAND_OFF)
|
|
||||||
str[5] = 'C'; // compander is enabled
|
|
||||||
|
|
||||||
UI_PrintStringSmall(str, LCD_WIDTH - (7 * 6), 0, y + 1);
|
|
||||||
#else
|
|
||||||
strcpy(str, " ");
|
|
||||||
|
|
||||||
if (is_freq_chan && freq_in_channel <= USER_CHANNEL_LAST)
|
|
||||||
str[0] = 'F'; // this VFO frequency is also found in a channel
|
str[0] = 'F'; // this VFO frequency is also found in a channel
|
||||||
|
|
||||||
#ifdef ENABLE_SCAN_IGNORE_LIST
|
|
||||||
if (FI_freq_ignored(frequency) >= 0)
|
|
||||||
str[1] = 'I'; // frequency is in the ignore list
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (g_vfo_info[vfo_num].channel.compand != COMPAND_OFF)
|
|
||||||
str[2] = 'C'; // compander is enabled
|
|
||||||
|
|
||||||
UI_PrintStringSmall(str, LCD_WIDTH - (7 * 3), 0, y + 1);
|
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
|
#ifdef ENABLE_SCAN_IGNORE_LIST
|
||||||
|
if (FI_freq_ignored(frequency) >= 0)
|
||||||
|
str[1] = 'I'; // frequency is in the ignore list
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (g_vfo_info[vfo_num].channel.compand != COMPAND_OFF)
|
||||||
|
str[2] = 'C'; // compander is enabled
|
||||||
|
|
||||||
|
UI_PrintStringSmall(str, LCD_WIDTH - (7 * 3), 0, y + 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1326,9 +1299,9 @@ void UI_DisplayMain(void)
|
|||||||
|
|
||||||
// name
|
// name
|
||||||
#ifdef ENABLE_SMALL_BOLD
|
#ifdef ENABLE_SMALL_BOLD
|
||||||
UI_PrintStringSmallBold(str, x + 4, 0, line + 0);
|
UI_PrintStringSmallBold(str, x + 4, 0, line);
|
||||||
#else
|
#else
|
||||||
UI_PrintStringSmall(str, x + 4, 0, line + 0);
|
UI_PrintStringSmall(str, x + 4, 0, line);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// frequency
|
// frequency
|
||||||
@ -1350,40 +1323,39 @@ void UI_DisplayMain(void)
|
|||||||
big_freq(frequency, x, line);
|
big_freq(frequency, x, line);
|
||||||
#else
|
#else
|
||||||
|
|
||||||
#ifdef ENABLE_SHOW_FREQS_CHAN
|
|
||||||
const unsigned int chan = g_vfo_info[vfo_num].freq_in_channel;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// sprintf(str, "%03u.%05u", frequency / 100000, frequency % 100000);
|
// sprintf(str, "%03u.%05u", frequency / 100000, frequency % 100000);
|
||||||
sprintf(str, "%u.%05u", frequency / 100000, frequency % 100000);
|
sprintf(str, "%u.%05u", frequency / 100000, frequency % 100000);
|
||||||
#ifdef ENABLE_TRIM_TRAILING_ZEROS
|
#ifdef ENABLE_TRIM_TRAILING_ZEROS
|
||||||
NUMBER_trim_trailing_zeros(str);
|
NUMBER_trim_trailing_zeros(str);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_SHOW_FREQS_CHAN
|
#ifdef ENABLE_SHOW_FREQ_IN_CHAN
|
||||||
|
{
|
||||||
//g_vfo_info[vfo_num].freq_in_channel = SETTINGS_find_channel(frequency);
|
//g_vfo_info[vfo_num].freq_in_channel = SETTINGS_find_channel(frequency);
|
||||||
if (chan <= USER_CHANNEL_LAST)
|
const unsigned int freq_in_channel = g_vfo_info[vfo_num].freq_in_channel;
|
||||||
|
|
||||||
|
if (freq_in_channel <= USER_CHANNEL_LAST)
|
||||||
{ // the frequency has a channel - show the channel name below the frequency
|
{ // the frequency has a channel - show the channel name below the frequency
|
||||||
|
|
||||||
// frequency
|
|
||||||
#ifdef ENABLE_SMALL_BOLD
|
#ifdef ENABLE_SMALL_BOLD
|
||||||
UI_PrintStringSmallBold(str, x + 4, 0, line + 0);
|
UI_PrintStringSmallBold(str, x, 0, line);
|
||||||
#else
|
#else
|
||||||
UI_PrintStringSmall(str, x + 4, 0, line + 0);
|
UI_PrintStringSmall(str, x, 0, line);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// channel name, if not then channel number
|
// channel name, if not then channel number
|
||||||
SETTINGS_fetch_channel_name(str, chan);
|
SETTINGS_fetch_channel_name(str, freq_in_channel);
|
||||||
if (str[0] == 0)
|
if (str[0] == 0)
|
||||||
// sprintf(str, "CH-%03u", 1 + chan);
|
//sprintf(str, "CH-%03u", 1 + freq_in_channel);
|
||||||
sprintf(str, "CH-%u", 1 + chan);
|
sprintf(str, "CH-%u", 1 + freq_in_channel);
|
||||||
UI_PrintStringSmall(str, x + 4, 0, line + 1);
|
UI_PrintStringSmall(str, x, 0, line + 1);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
UI_PrintString(str, x, 0, line, 8);
|
||||||
{ // show the frequency in the main font
|
|
||||||
UI_PrintString(str, x, 0, line, 8);
|
|
||||||
}
|
}
|
||||||
|
#else
|
||||||
|
UI_PrintString(str, x, 0, line, 8);
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -1430,38 +1402,27 @@ void UI_DisplayMain(void)
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_SHOW_FREQS_CHAN
|
strcpy(str, " ");
|
||||||
strcpy(str, " ");
|
/*
|
||||||
|
#ifdef ENABLE_SHOW_FREQ_IN_CHAN
|
||||||
#ifdef ENABLE_SCAN_IGNORE_LIST
|
if (IS_FREQ_CHANNEL(scrn_chan))
|
||||||
if (FI_freq_ignored(frequency) >= 0)
|
{
|
||||||
str[0] = 'I'; // frequency is in the ignore list
|
const uint8_t freq_in_channel = g_vfo_info[vfo_num].freq_in_channel;
|
||||||
#endif
|
//const uint8_t freq_in_channel = SETTINGS_find_channel(frequency); // was way to slow
|
||||||
|
if (freq_in_channel <= USER_CHANNEL_LAST)
|
||||||
if (g_vfo_info[vfo_num].channel.compand != COMPAND_OFF)
|
str[0] = 'F'; // this VFO frequency is also found in a channel
|
||||||
str[1] = 'C'; // compander is enabled
|
}
|
||||||
|
|
||||||
UI_PrintStringSmall(str, LCD_WIDTH - (7 * 2), 0, line + 1);
|
|
||||||
#else
|
|
||||||
const bool is_freq_chan = IS_FREQ_CHANNEL(scrn_chan);
|
|
||||||
const uint8_t freq_in_channel = g_vfo_info[vfo_num].freq_in_channel;
|
|
||||||
// const uint8_t freq_in_channel = SETTINGS_find_channel(frequency); // was way to slow
|
|
||||||
|
|
||||||
strcpy(str, " ");
|
|
||||||
|
|
||||||
#ifdef ENABLE_SCAN_IGNORE_LIST
|
|
||||||
if (FI_freq_ignored(frequency) >= 0)
|
|
||||||
str[0] = 'I'; // frequency is in the ignore list
|
|
||||||
#endif
|
|
||||||
|
|
||||||
if (is_freq_chan && freq_in_channel <= USER_CHANNEL_LAST)
|
|
||||||
str[1] = 'F'; // this VFO frequency is also found in a channel
|
|
||||||
|
|
||||||
if (g_vfo_info[vfo_num].channel.compand != COMPAND_OFF)
|
|
||||||
str[2] = 'C'; // compander is enabled
|
|
||||||
|
|
||||||
UI_PrintStringSmall(str, LCD_WIDTH - (7 * 3), 0, line + 1);
|
|
||||||
#endif
|
#endif
|
||||||
|
*/
|
||||||
|
#ifdef ENABLE_SCAN_IGNORE_LIST
|
||||||
|
if (FI_freq_ignored(frequency) >= 0)
|
||||||
|
str[1] = 'I'; // frequency is in the ignore list
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (g_vfo_info[vfo_num].channel.compand != COMPAND_OFF)
|
||||||
|
str[2] = 'C'; // compander is enabled
|
||||||
|
|
||||||
|
UI_PrintStringSmall(str, LCD_WIDTH - (7 * 3), 0, line + 1);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
32
ui/menu.c
32
ui/menu.c
@ -120,11 +120,21 @@ const t_menu_item g_menu_list[] =
|
|||||||
{"D ST", VOICE_ID_INVALID, MENU_DTMF_ST },
|
{"D ST", VOICE_ID_INVALID, MENU_DTMF_ST },
|
||||||
{"D RSP", VOICE_ID_INVALID, MENU_DTMF_RSP },
|
{"D RSP", VOICE_ID_INVALID, MENU_DTMF_RSP },
|
||||||
{"D HOLD", VOICE_ID_INVALID, MENU_DTMF_HOLD },
|
{"D HOLD", VOICE_ID_INVALID, MENU_DTMF_HOLD },
|
||||||
{"D PRE", VOICE_ID_INVALID, MENU_DTMF_PRE },
|
|
||||||
{"D DCD", VOICE_ID_INVALID, MENU_DTMF_DCD },
|
{"D DCD", VOICE_ID_INVALID, MENU_DTMF_DCD },
|
||||||
{"D LIST", VOICE_ID_INVALID, MENU_DTMF_LIST },
|
{"D LIST", VOICE_ID_INVALID, MENU_DTMF_LIST },
|
||||||
#ifdef ENABLE_DTMF_LIVE_DECODER
|
#ifdef ENABLE_DTMF_LIVE_DECODER
|
||||||
{"D LIVE", VOICE_ID_INVALID, MENU_DTMF_LIVE_DEC }, // live DTMF decoder
|
{"D LIVE", VOICE_ID_INVALID, MENU_DTMF_LIVE_DEC }, // live DTMF decoder
|
||||||
|
#endif
|
||||||
|
#ifdef ENABLE_DTMF_TIMING_SETTINGS
|
||||||
|
{"D PRE", VOICE_ID_INVALID, MENU_DTMF_PRE },
|
||||||
|
// MENU_DTMF_1ST_PERSIST,
|
||||||
|
// MENU_DTMF_HASH_PERSIST,
|
||||||
|
// MENU_DTMF_PERSIST,
|
||||||
|
// MENU_DTMF_INTERVAL,
|
||||||
|
// g_eeprom.config.setting.dtmf.first_code_persist_time
|
||||||
|
// g_eeprom.config.setting.dtmf.hash_code_persist_time
|
||||||
|
// g_eeprom.config.setting.dtmf.code_persist_time
|
||||||
|
// g_eeprom.config.setting.dtmf.code_interval_time
|
||||||
#endif
|
#endif
|
||||||
{"PonMSG", VOICE_ID_INVALID, MENU_PON_MSG },
|
{"PonMSG", VOICE_ID_INVALID, MENU_PON_MSG },
|
||||||
{"ROGER", VOICE_ID_INVALID, MENU_ROGER_MODE },
|
{"ROGER", VOICE_ID_INVALID, MENU_ROGER_MODE },
|
||||||
@ -1073,10 +1083,22 @@ void UI_DisplayMenu(void)
|
|||||||
|
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MENU_DTMF_PRE:
|
#ifdef ENABLE_DTMF_TIMING_SETTINGS
|
||||||
strcpy(str, "DTMF BOT\nDELAY\n");
|
case MENU_DTMF_PRE:
|
||||||
sprintf(str + strlen(str), "%dms", 10 * g_sub_menu_selection);
|
strcpy(str, "DTMF BOT\nDELAY\n");
|
||||||
break;
|
sprintf(str + strlen(str), "%dms", 10 * g_sub_menu_selection);
|
||||||
|
break;
|
||||||
|
|
||||||
|
// MENU_DTMF_1ST_PERSIST,
|
||||||
|
// MENU_DTMF_HASH_PERSIST,
|
||||||
|
// MENU_DTMF_PERSIST,
|
||||||
|
// MENU_DTMF_INTERVAL,
|
||||||
|
|
||||||
|
// g_eeprom.config.setting.dtmf.first_code_persist_time
|
||||||
|
// g_eeprom.config.setting.dtmf.hash_code_persist_time
|
||||||
|
// g_eeprom.config.setting.dtmf.code_persist_time
|
||||||
|
// g_eeprom.config.setting.dtmf.code_interval_time
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef ENABLE_MDC1200
|
#ifdef ENABLE_MDC1200
|
||||||
case MENU_MDC1200_MODE:
|
case MENU_MDC1200_MODE:
|
||||||
|
12
ui/menu.h
12
ui/menu.h
@ -100,13 +100,23 @@ enum
|
|||||||
MENU_DN_CODE,
|
MENU_DN_CODE,
|
||||||
MENU_DTMF_ST,
|
MENU_DTMF_ST,
|
||||||
MENU_DTMF_HOLD,
|
MENU_DTMF_HOLD,
|
||||||
MENU_DTMF_PRE,
|
|
||||||
MENU_DTMF_LIST,
|
MENU_DTMF_LIST,
|
||||||
MENU_DTMF_RSP,
|
MENU_DTMF_RSP,
|
||||||
MENU_DTMF_DCD,
|
MENU_DTMF_DCD,
|
||||||
#ifdef ENABLE_DTMF_LIVE_DECODER
|
#ifdef ENABLE_DTMF_LIVE_DECODER
|
||||||
MENU_DTMF_LIVE_DEC,
|
MENU_DTMF_LIVE_DEC,
|
||||||
#endif
|
#endif
|
||||||
|
#ifdef ENABLE_DTMF_TIMING_SETTINGS
|
||||||
|
MENU_DTMF_PRE,
|
||||||
|
// MENU_DTMF_1ST_PERSIST,
|
||||||
|
// MENU_DTMF_HASH_PERSIST,
|
||||||
|
// MENU_DTMF_PERSIST,
|
||||||
|
// MENU_DTMF_INTERVAL,
|
||||||
|
// g_eeprom.config.setting.dtmf.first_code_persist_time
|
||||||
|
// g_eeprom.config.setting.dtmf.hash_code_persist_time
|
||||||
|
// g_eeprom.config.setting.dtmf.code_persist_time
|
||||||
|
// g_eeprom.config.setting.dtmf.code_interval_time
|
||||||
|
#endif
|
||||||
#ifdef ENABLE_MDC1200
|
#ifdef ENABLE_MDC1200
|
||||||
MENU_MDC1200_MODE,
|
MENU_MDC1200_MODE,
|
||||||
MENU_MDC1200_ID,
|
MENU_MDC1200_ID,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user