0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-05-18 16:01:18 +03:00

single VFO display update

This commit is contained in:
OneOfEleven 2023-12-01 10:34:53 +00:00
parent 9819afa405
commit ff2248b287
10 changed files with 271 additions and 290 deletions

View File

@ -36,6 +36,7 @@ ENABLE_TX1750 := 0
ENABLE_MDC1200 := 0 ENABLE_MDC1200 := 0
ENABLE_MDC1200_SHOW_OP_ARG := 1 ENABLE_MDC1200_SHOW_OP_ARG := 1
ENABLE_MDC1200_SIDE_BEEP := 1 ENABLE_MDC1200_SIDE_BEEP := 1
#
ENABLE_PWRON_PASSWORD := 0 ENABLE_PWRON_PASSWORD := 0
ENABLE_RESET_AES_KEY := 0 ENABLE_RESET_AES_KEY := 0
ENABLE_BIG_FREQ := 0 ENABLE_BIG_FREQ := 0
@ -49,9 +50,9 @@ ENABLE_SMALLEST_FONT := 0
ENABLE_TRIM_TRAILING_ZEROS := 0 ENABLE_TRIM_TRAILING_ZEROS := 0
ENABLE_WIDE_RX := 1 ENABLE_WIDE_RX := 1
ENABLE_TX_WHEN_AM := 0 ENABLE_TX_WHEN_AM := 0
# Freq calibration 188 B # Frequency calibration 188 B
ENABLE_F_CAL_MENU := 0 ENABLE_F_CAL_MENU := 0
ENABLE_FM_DEV_CAL_MENU := 1 ENABLE_FM_DEV_CAL_MENU := 0
ENABLE_TX_UNLOCK_MENU := 0 ENABLE_TX_UNLOCK_MENU := 0
#ENABLE_TX_POWER_CAL_MENU := 0 #ENABLE_TX_POWER_CAL_MENU := 0
ENABLE_TX_POWER_FIX := 1 ENABLE_TX_POWER_FIX := 1
@ -76,8 +77,6 @@ ENABLE_SQUELCH_MORE_SENSITIVE := 1
ENABLE_SQ_OPEN_WITH_UP_DN_BUTTS := 1 ENABLE_SQ_OPEN_WITH_UP_DN_BUTTS := 1
ENABLE_FASTER_CHANNEL_SCAN := 1 ENABLE_FASTER_CHANNEL_SCAN := 1
ENABLE_COPY_CHAN_TO_VFO_TO_CHAN := 1 ENABLE_COPY_CHAN_TO_VFO_TO_CHAN := 1
# Rx Signal Bar 400 B
ENABLE_RX_SIGNAL_BAR := 1
# Tx Audio Bar 300 B # Tx Audio Bar 300 B
ENABLE_TX_AUDIO_BAR := 0 ENABLE_TX_AUDIO_BAR := 0
# Side Button Menu 300 B # Side Button Menu 300 B
@ -462,9 +461,6 @@ endif
ifeq ($(ENABLE_backlight_ON_RX),1) ifeq ($(ENABLE_backlight_ON_RX),1)
CFLAGS += -DENABLE_backlight_ON_RX CFLAGS += -DENABLE_backlight_ON_RX
endif endif
ifeq ($(ENABLE_RX_SIGNAL_BAR),1)
CFLAGS += -DENABLE_RX_SIGNAL_BAR
endif
ifeq ($(ENABLE_TX_AUDIO_BAR),1) ifeq ($(ENABLE_TX_AUDIO_BAR),1)
CFLAGS += -DENABLE_TX_AUDIO_BAR CFLAGS += -DENABLE_TX_AUDIO_BAR
endif endif

View File

@ -94,7 +94,6 @@ ENABLE_SQUELCH_MORE_SENSITIVE := 1 make squelch levels a little bit mor
ENABLE_SQ_OPEN_WITH_UP_DN_BUTTS := 1 open the squelch when holding down UP or DN buttons when in frequency mode ENABLE_SQ_OPEN_WITH_UP_DN_BUTTS := 1 open the squelch when holding down UP or DN buttons when in frequency mode
ENABLE_FASTER_CHANNEL_SCAN := 1 increase the channel scan speed, but also make the squelch more twitchy ENABLE_FASTER_CHANNEL_SCAN := 1 increase the channel scan speed, but also make the squelch more twitchy
ENABLE_COPY_CHAN_TO_VFO_TO_CHAN := 1 long press M, copy channel to VFO, or VFO to channel ENABLE_COPY_CHAN_TO_VFO_TO_CHAN := 1 long press M, copy channel to VFO, or VFO to channel
ENABLE_RX_SIGNAL_BAR := 1 enable a menu option for showing an RSSI bar graph
ENABLE_TX_AUDIO_BAR := 1 enable a menu option for showing a TX audio level bar ENABLE_TX_AUDIO_BAR := 1 enable a menu option for showing a TX audio level bar
ENABLE_SIDE_BUTT_MENU := 1 enable menu option for configuring the programmable side buttons ENABLE_SIDE_BUTT_MENU := 1 enable menu option for configuring the programmable side buttons
ENABLE_KEYLOCK := 1 enable keylock menu option + keylock code ENABLE_KEYLOCK := 1 enable keylock menu option + keylock code

View File

@ -2085,11 +2085,9 @@ void APP_time_slice_500ms(void)
#ifdef ENABLE_DTMF_LIVE_DECODER #ifdef ENABLE_DTMF_LIVE_DECODER
if (g_dtmf_rx_live_timeout > 0) if (g_dtmf_rx_live_timeout > 0)
{ {
#ifdef ENABLE_RX_SIGNAL_BAR
if (g_center_line == CENTER_LINE_DTMF_DEC || if (g_center_line == CENTER_LINE_DTMF_DEC ||
g_center_line == CENTER_LINE_NONE) // wait till the center line is free for us to use before timing out g_center_line == CENTER_LINE_NONE) // wait till the center line is free for us to use before timing out
#endif
{
if (--g_dtmf_rx_live_timeout == 0) if (--g_dtmf_rx_live_timeout == 0)
{ {
if (g_dtmf_rx_live[0] != 0) if (g_dtmf_rx_live[0] != 0)
@ -2099,7 +2097,6 @@ void APP_time_slice_500ms(void)
} }
} }
} }
}
#endif #endif
if (g_menu_tick_10ms > 0) if (g_menu_tick_10ms > 0)

View File

@ -239,9 +239,7 @@ int MENU_GetLimits(uint8_t Cursor, int32_t *pMin, int32_t *pMax)
#ifdef ENABLE_TX_AUDIO_BAR #ifdef ENABLE_TX_AUDIO_BAR
case MENU_TX_BAR: case MENU_TX_BAR:
#endif #endif
#ifdef ENABLE_RX_SIGNAL_BAR
case MENU_RX_BAR: case MENU_RX_BAR:
#endif
case MENU_BUSY_CHAN_LOCK: case MENU_BUSY_CHAN_LOCK:
case MENU_BEEP: case MENU_BEEP:
#ifdef ENABLE_KEYLOCK #ifdef ENABLE_KEYLOCK
@ -706,11 +704,9 @@ void MENU_AcceptSetting(void)
break; break;
#endif #endif
#ifdef ENABLE_RX_SIGNAL_BAR
case MENU_RX_BAR: case MENU_RX_BAR:
g_eeprom.config.setting.enable_rssi_bar = g_sub_menu_selection; g_eeprom.config.setting.enable_rssi_bar = g_sub_menu_selection;
break; break;
#endif
case MENU_COMPAND: case MENU_COMPAND:
g_tx_vfo->channel.compand = g_sub_menu_selection; g_tx_vfo->channel.compand = g_sub_menu_selection;
@ -1223,11 +1219,9 @@ void MENU_ShowCurrentSetting(void)
break; break;
#endif #endif
#ifdef ENABLE_RX_SIGNAL_BAR
case MENU_RX_BAR: case MENU_RX_BAR:
g_sub_menu_selection = g_eeprom.config.setting.enable_rssi_bar; g_sub_menu_selection = g_eeprom.config.setting.enable_rssi_bar;
break; break;
#endif
case MENU_COMPAND: case MENU_COMPAND:
g_sub_menu_selection = g_tx_vfo->channel.compand; g_sub_menu_selection = g_tx_vfo->channel.compand;

Binary file not shown.

Binary file not shown.

View File

@ -315,11 +315,8 @@ void SETTINGS_read_eeprom(void)
// g_eeprom.config.setting.enable_tx_470 = (g_eeprom.config.setting.enable_tx_470 < 2) ? g_eeprom.config.setting.enable_tx_470 : 0; // g_eeprom.config.setting.enable_tx_470 = (g_eeprom.config.setting.enable_tx_470 < 2) ? g_eeprom.config.setting.enable_tx_470 : 0;
// g_eeprom.config.setting.enable_350 = (g_eeprom.config.setting.enable_350 < 2) ? g_eeprom.config.setting.enable_350 : 1; // g_eeprom.config.setting.enable_350 = (g_eeprom.config.setting.enable_350 < 2) ? g_eeprom.config.setting.enable_350 : 1;
// g_eeprom.config.setting.enable_scrambler = (g_eeprom.config.setting.enable_scrambler & (1u << 0)) ? 1 : 0; // g_eeprom.config.setting.enable_scrambler = (g_eeprom.config.setting.enable_scrambler & (1u << 0)) ? 1 : 0;
#ifdef ENABLE_RX_SIGNAL_BAR
// g_eeprom.config.setting.enable_rssi_bar = (Data[6] & (1u << 1)) ? true : false; // g_eeprom.config.setting.enable_rssi_bar = (Data[6] & (1u << 1)) ? true : false;
#else
g_eeprom.config.setting.enable_rssi_bar = 0;
#endif
// g_eeprom.config.setting.tx_enable = (Data[7] & (1u << 0)) ? true : false; // g_eeprom.config.setting.tx_enable = (Data[7] & (1u << 0)) ? true : false;
// g_eeprom.config.setting.dtmf_live_decoder = (Data[7] & (1u << 1)) ? true : false; // g_eeprom.config.setting.dtmf_live_decoder = (Data[7] & (1u << 1)) ? true : false;
g_eeprom.config.setting.battery_text = (g_eeprom.config.setting.battery_text < 3) ? g_eeprom.config.setting.battery_text : 2; g_eeprom.config.setting.battery_text = (g_eeprom.config.setting.battery_text < 3) ? g_eeprom.config.setting.battery_text : 2;

206
ui/main.c
View File

@ -168,9 +168,8 @@ void draw_bar(uint8_t *line, const int len, const int max_width)
} }
#endif #endif
#ifdef ENABLE_RX_SIGNAL_BAR bool UI_DisplayRSSIBar(const int rssi, const unsigned int glitch, const unsigned int noise, const bool now)
bool UI_DisplayRSSIBar(const int rssi, const unsigned int glitch, const unsigned int noise, const bool now) {
{
if (g_eeprom.config.setting.enable_rssi_bar) if (g_eeprom.config.setting.enable_rssi_bar)
{ {
#ifdef SHOW_RX_TEST_VALUES #ifdef SHOW_RX_TEST_VALUES
@ -202,13 +201,13 @@ void draw_bar(uint8_t *line, const int len, const int max_width)
(void)glitch; // TODO: (void)glitch; // TODO:
(void)noise; (void)noise;
// const int s0_dBm = -127; // S0 .. base level //const int s0_dBm = -127; // S0 .. base level
const int s0_dBm = -147; // S0 .. base level const int s0_dBm = -147; // S0 .. base level
const int s9_dBm = s0_dBm + (6 * 9); // S9 .. 6dB/S-Point const int s9_dBm = s0_dBm + (6 * 9); // S9 .. 6dB/S-Point
const int bar_max_dBm = s9_dBm + 80; // S9+80dB const int bar_max_dBm = s9_dBm + 80; // S9+80dB
// const int bar_min_dBm = s0_dBm + (6 * 0); // S0 const int bar_min_dBm = s0_dBm + (6 * 0); // S0
const int bar_min_dBm = s0_dBm + (6 * 2); // S2 //const int bar_min_dBm = s0_dBm + (6 * 2); // S2
// ************ // ************
@ -266,12 +265,12 @@ void draw_bar(uint8_t *line, const int len, const int max_width)
} }
return false; return false;
} }
#endif
void UI_update_rssi(const int rssi, const unsigned int glitch, const unsigned int noise, const unsigned int vfo) void UI_update_rssi(const int rssi, const unsigned int glitch, const unsigned int noise, const unsigned int vfo)
{ {
#ifdef ENABLE_RX_SIGNAL_BAR (void)glitch;
(void)noise;
if (g_center_line == CENTER_LINE_RSSI) if (g_center_line == CENTER_LINE_RSSI)
{ // large RSSI dBm, S-point, bar level { // large RSSI dBm, S-point, bar level
@ -283,11 +282,6 @@ void UI_update_rssi(const int rssi, const unsigned int glitch, const unsigned in
UI_DisplayRSSIBar(rssi_level, glitch, noise, true); UI_DisplayRSSIBar(rssi_level, glitch, noise, true);
} }
#else
(void)glitch;
(void)noise;
#endif
#ifdef ENABLE_SINGLE_VFO_CHAN #ifdef ENABLE_SINGLE_VFO_CHAN
if (single_vfo >= 0 && !pan_enabled) if (single_vfo >= 0 && !pan_enabled)
return; return;
@ -580,7 +574,6 @@ void UI_DisplayCenterLine(void)
else else
#endif #endif
#ifdef ENABLE_RX_SIGNAL_BAR
// show the RX RSSI dBm, S-point and signal strength bar graph // show the RX RSSI dBm, S-point and signal strength bar graph
if (rx && g_eeprom.config.setting.enable_rssi_bar) if (rx && g_eeprom.config.setting.enable_rssi_bar)
{ {
@ -589,7 +582,6 @@ void UI_DisplayCenterLine(void)
UI_DisplayRSSIBar(rssi_level, g_current_glitch[g_rx_vfo_num], g_current_noise[g_rx_vfo_num], false); UI_DisplayRSSIBar(rssi_level, g_current_glitch[g_rx_vfo_num], g_current_noise[g_rx_vfo_num], false);
} }
else else
#endif
if (rx || g_current_function == FUNCTION_FOREGROUND || g_current_function == FUNCTION_POWER_SAVE) if (rx || g_current_function == FUNCTION_FOREGROUND || g_current_function == FUNCTION_POWER_SAVE)
{ {
@ -656,58 +648,39 @@ 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];
// TODO: single VFO mode
#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;
#endif #endif
{ // ********************
{ // top line
unsigned int y = 0; unsigned int y = 0;
unsigned int x = 2; unsigned int x = 0;
sprintf(str, "VFO-%d", 1 + vfo_num); #ifdef ENABLE_KILL_REVIVE
if (g_eeprom.config.setting.radio_disabled)
{
#ifdef ENABLE_SMALL_BOLD
UI_PrintStringSmallBold("DISABLED", x + 10, 0, y);
#else
UI_PrintStringSmall("DISABLED", x + 10, 0, y);
#endif
}
else
#endif
{
{ // VFO number
sprintf(str, "VFO%d", 1 + vfo_num);
UI_PrintStringSmall(str, x, 0, y); UI_PrintStringSmall(str, x, 0, y);
}
x += 7 * 6; x += 7 * 5;
if (g_current_function == FUNCTION_TRANSMIT || state != VFO_STATE_NORMAL)
{ // transmitting
if (state != VFO_STATE_NORMAL)
{
if (state < ARRAY_SIZE(state_list))
{
#ifdef ENABLE_SMALL_BOLD
UI_PrintStringSmallBold(state_list[state], x, 0, y);
#else
UI_PrintStringSmall(state_list[state], x, 0, y);
#endif
}
}
else
{ // show the TX symbol
#ifdef ENABLE_SMALL_BOLD
UI_PrintStringSmallBold("TX", x, 0, y);
#else
UI_PrintStringSmall("TX", x, 0, y);
#endif
}
}
else
if (g_current_function == FUNCTION_RECEIVE && g_squelch_open)
{ // receiving .. show the RX symbol
#ifdef ENABLE_SMALL_BOLD
UI_PrintStringSmallBold("RX", x, 0, y);
#else
UI_PrintStringSmall("RX", x, 0, y);
#endif
}
if (state == VFO_STATE_NORMAL) if (state == VFO_STATE_NORMAL)
{ { // frequency band/channel number
x += 7 * 5;
//x = LCD_WIDTH - 1 - (7 * 4);
if (scrn_chan <= USER_CHANNEL_LAST) if (scrn_chan <= USER_CHANNEL_LAST)
{ // channel mode { // channel mode
@ -722,7 +695,6 @@ const char *state_list[] = {"", "BUSY", "BAT LOW", "TX DISABLE", "TIMEOUT", "ALA
else else
if (IS_FREQ_CHANNEL(scrn_chan)) if (IS_FREQ_CHANNEL(scrn_chan))
{ // frequency mode { // frequency mode
// show the frequency band number
sprintf(str, "F%u", 1 + scrn_chan - FREQ_CHANNEL_FIRST); sprintf(str, "F%u", 1 + scrn_chan - FREQ_CHANNEL_FIRST);
UI_PrintStringSmall(str, x, 0, y); UI_PrintStringSmall(str, x, 0, y);
} }
@ -740,6 +712,51 @@ const char *state_list[] = {"", "BUSY", "BAT LOW", "TX DISABLE", "TIMEOUT", "ALA
UI_PrintStringSmall(str, x, 0, y); UI_PrintStringSmall(str, x, 0, y);
} }
#endif #endif
x += 7 * 5;
{ // RX or TX or state message
str[0] = 0;
if (g_current_function == FUNCTION_TRANSMIT)
strcpy(str, "TX");
else
if (g_current_function == FUNCTION_RECEIVE && g_squelch_open)
strcpy(str, "RX");
#ifdef ENABLE_SMALL_BOLD
UI_PrintStringSmallBold(str, x, 0, y);
#else
UI_PrintStringSmall(str, x, 0, y);
#endif
}
x += 7 * 3;
#if 1 // not quite enough room to fit this in :(
{ // step size
const uint32_t step = g_vfo_info[vfo_num].step_freq * 10;
if (step < 1000)
{ // Hz
sprintf(str, "%u", step);
}
else
{ // kHz
sprintf(str, "%u.%03u", step / 1000, step % 1000);
NUMBER_trim_trailing_zeros(str);
strcat(str, "k");
}
UI_PrintStringSmall(str, x, 0, y);
}
#endif
}
else
{
#ifdef ENABLE_SMALL_BOLD
UI_PrintStringSmallBold(state_list[state], x, 0, y);
#else
UI_PrintStringSmall(state_list[state], x, 0, y);
#endif
}
} }
} }
@ -747,11 +764,11 @@ const char *state_list[] = {"", "BUSY", "BAT LOW", "TX DISABLE", "TIMEOUT", "ALA
{ {
unsigned int y = 1; unsigned int y = 1;
unsigned int x = 2; unsigned int x = 6;
if (g_input_box_index > 0 && IS_FREQ_CHANNEL(scrn_chan) && g_eeprom.config.setting.tx_vfo_num == vfo_num) if (g_input_box_index > 0 && IS_FREQ_CHANNEL(scrn_chan) && g_eeprom.config.setting.tx_vfo_num == vfo_num)
{ // user is entering a frequency { // user is entering a frequency
UI_DisplayFrequency(g_input_box, x + 5, y, true, 8); UI_DisplayFrequency(g_input_box, x, y, true, 8);
} }
else else
{ {
@ -768,16 +785,14 @@ const char *state_list[] = {"", "BUSY", "BAT LOW", "TX DISABLE", "TIMEOUT", "ALA
SETTINGS_fetch_channel_name(str, scrn_chan); SETTINGS_fetch_channel_name(str, scrn_chan);
if (str[0] == 0) if (str[0] == 0)
sprintf(str, "CH %u", scrn_chan); sprintf(str, "CH %u", scrn_chan);
UI_PrintString(str, x + 5, 0, y, 8); UI_PrintString(str, x, 0, y, 8);
//x = 2;
// frequency // frequency
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
UI_PrintString(str, x + 5, 0, y + 2, 8); UI_PrintString(str, x, 0, y + 2, 8);
} }
else else
// if (IS_FREQ_CHANNEL(scrn_chan)) // if (IS_FREQ_CHANNEL(scrn_chan))
@ -818,13 +833,13 @@ const char *state_list[] = {"", "BUSY", "BAT LOW", "TX DISABLE", "TIMEOUT", "ALA
else else
#endif #endif
*/ { // show the frequency in the main font */ { // show the frequency in the main font
// UI_PrintString(str, x + 5, 0, y, 8); // UI_PrintString(str, x, 0, y, 8);
UI_PrintString(str, x + 5, 0, y + 1, 8); UI_PrintString(str, x, 0, y + 1, 8);
} }
#endif #endif
} }
// show channel symbols // channel symbols
if (scrn_chan <= USER_CHANNEL_LAST) if (scrn_chan <= USER_CHANNEL_LAST)
//if (IS_NOT_NOAA_CHANNEL(scrn_chan)) //if (IS_NOT_NOAA_CHANNEL(scrn_chan))
@ -841,11 +856,6 @@ const char *state_list[] = {"", "BUSY", "BAT LOW", "TX DISABLE", "TIMEOUT", "ALA
//x += sizeof(BITMAP_SCANLIST2); //x += sizeof(BITMAP_SCANLIST2);
} }
#ifdef ENABLE_BIG_FREQ
// no room for these symbols
#else
{ {
#ifdef ENABLE_SHOW_FREQS_CHAN #ifdef ENABLE_SHOW_FREQS_CHAN
strcpy(str, " "); strcpy(str, " ");
@ -887,30 +897,27 @@ const char *state_list[] = {"", "BUSY", "BAT LOW", "TX DISABLE", "TIMEOUT", "ALA
UI_PrintStringSmall(str, LCD_WIDTH - (7 * 3), 0, y + 1); UI_PrintStringSmall(str, LCD_WIDTH - (7 * 3), 0, y + 1);
#endif #endif
} }
#endif
} }
y += 2; y += 2;
x = LCD_WIDTH - (7 * 6); x = LCD_WIDTH - (7 * 6);
// show the audio scramble symbol { // audio scramble symbol
if (g_vfo_info[vfo_num].channel.scrambler > 0 && g_eeprom.config.setting.enable_scrambler) if (g_vfo_info[vfo_num].channel.scrambler > 0 && g_eeprom.config.setting.enable_scrambler)
UI_PrintStringSmall("SCR", x, 0, y); UI_PrintStringSmall("SCR", x, 0, y);
}
{ // show the modulation mode { // modulation mode
const char *mode_list[] = {"FM", "AM", "SB", ""}; const char *mode_list[] = {"FM", "AM", "SB", ""};
const unsigned int mode = g_vfo_info[vfo_num].channel.mod_mode; strcpy(str, mode_list[g_vfo_info[vfo_num].channel.mod_mode]);
if (mode < ARRAY_SIZE(mode_list))
strcpy(str, mode_list[mode]);
UI_PrintStringSmall(str, x + (7 * 4), 0, y); UI_PrintStringSmall(str, x + (7 * 4), 0, y);
} }
y++; y++;
x = LCD_WIDTH - (7 * 5); x = LCD_WIDTH - (7 * 5);
// show the CTCSS / CDCSS code { // CTCSS/CDCSS code
str[0] = '\0'; str[0] = 0;
if (g_vfo_info[vfo_num].channel.mod_mode == MOD_MODE_FM) if (g_vfo_info[vfo_num].channel.mod_mode == MOD_MODE_FM)
{ // show the CTCSS/CDCSS symbol { // show the CTCSS/CDCSS symbol
const freq_config_t *pConfig = (g_current_function == FUNCTION_TRANSMIT) ? g_vfo_info[vfo_num].p_tx : g_vfo_info[vfo_num].p_rx; const freq_config_t *pConfig = (g_current_function == FUNCTION_TRANSMIT) ? g_vfo_info[vfo_num].p_tx : g_vfo_info[vfo_num].p_rx;
@ -919,7 +926,7 @@ const char *state_list[] = {"", "BUSY", "BAT LOW", "TX DISABLE", "TIMEOUT", "ALA
switch (code_type) switch (code_type)
{ {
case CODE_TYPE_NONE: case CODE_TYPE_NONE:
str[0] = 0; //str[0] = 0;
break; break;
case CODE_TYPE_CONTINUOUS_TONE: case CODE_TYPE_CONTINUOUS_TONE:
sprintf(str, "%3u.%u", CTCSS_TONE_LIST[code] / 10, CTCSS_TONE_LIST[code] % 10); sprintf(str, "%3u.%u", CTCSS_TONE_LIST[code] / 10, CTCSS_TONE_LIST[code] % 10);
@ -931,6 +938,7 @@ const char *state_list[] = {"", "BUSY", "BAT LOW", "TX DISABLE", "TIMEOUT", "ALA
} }
} }
UI_PrintStringSmall(str, x, 0, y); UI_PrintStringSmall(str, x, 0, y);
}
// *************************************** // ***************************************
@ -944,17 +952,16 @@ const char *state_list[] = {"", "BUSY", "BAT LOW", "TX DISABLE", "TIMEOUT", "ALA
#endif #endif
{ {
if (FREQUENCY_tx_freq_check(g_vfo_info[vfo_num].p_tx->frequency) == 0) if (FREQUENCY_tx_freq_check(g_vfo_info[vfo_num].p_tx->frequency) == 0)
{ // show the TX power { // TX power
const char *pwr_list[] = {"LOW", "MID", "HIGH", ""}; const char *pwr_list[] = {"LOW", "MID", "HIGH", "U"};
const unsigned int i = g_vfo_info[vfo_num].channel.tx_power; const unsigned int i = g_vfo_info[vfo_num].channel.tx_power;
if (i < OUTPUT_POWER_USER)
strcpy(str, pwr_list[i]); strcpy(str, pwr_list[i]);
else if (i == OUTPUT_POWER_USER)
sprintf(str, "U%02u", g_tx_vfo->channel.tx_power_user); sprintf(str + strlen(str), "%03u", g_tx_vfo->channel.tx_power_user);
UI_PrintStringSmall(str, x, 0, y); UI_PrintStringSmall(str, x, 0, y);
if (g_vfo_info[vfo_num].freq_config_rx.frequency != g_vfo_info[vfo_num].freq_config_tx.frequency) if (g_vfo_info[vfo_num].freq_config_rx.frequency != g_vfo_info[vfo_num].freq_config_tx.frequency)
{ // show the TX offset symbol { // TX offset symbol
const char *dir_list[] = {"", "+", "-"}; const char *dir_list[] = {"", "+", "-"};
const unsigned int i = g_vfo_info[vfo_num].channel.tx_offset_dir; const unsigned int i = g_vfo_info[vfo_num].channel.tx_offset_dir;
UI_PrintStringSmall(dir_list[i], x + (7 * 5), 0, y); UI_PrintStringSmall(dir_list[i], x + (7 * 5), 0, y);
@ -962,15 +969,14 @@ const char *state_list[] = {"", "BUSY", "BAT LOW", "TX DISABLE", "TIMEOUT", "ALA
} }
} }
{ // TX/RX reverse symbol
x += 7 * 7; x += 7 * 7;
// show the TX/RX reverse symbol
if (g_vfo_info[vfo_num].channel.frequency_reverse) if (g_vfo_info[vfo_num].channel.frequency_reverse)
UI_PrintStringSmall("R", x, 0, y); UI_PrintStringSmall("R", x, 0, y);
}
{ // wide/narrow band symbol
x += 7 * 2; x += 7 * 2;
// show the narrow band symbol
strcpy(str, " "); strcpy(str, " ");
if (g_vfo_info[vfo_num].channel.channel_bandwidth == BANDWIDTH_WIDE) if (g_vfo_info[vfo_num].channel.channel_bandwidth == BANDWIDTH_WIDE)
str[0] = 'W'; str[0] = 'W';
@ -978,17 +984,15 @@ const char *state_list[] = {"", "BUSY", "BAT LOW", "TX DISABLE", "TIMEOUT", "ALA
if (g_vfo_info[vfo_num].channel.channel_bandwidth == BANDWIDTH_NARROW) if (g_vfo_info[vfo_num].channel.channel_bandwidth == BANDWIDTH_NARROW)
str[0] = 'N'; str[0] = 'N';
UI_PrintStringSmall(str, x, 0, y); UI_PrintStringSmall(str, x, 0, y);
}
x += 7 * 2; { // DTMF decoding symbol
str[0] = 0;
// show the DTMF decoding symbol
#ifdef ENABLE_KILL_REVIVE
if (g_vfo_info[vfo_num].channel.dtmf_decoding_enable || g_eeprom.config.setting.radio_disabled)
UI_PrintStringSmall("DTMF", x, 0, y);
#else
if (g_vfo_info[vfo_num].channel.dtmf_decoding_enable) if (g_vfo_info[vfo_num].channel.dtmf_decoding_enable)
UI_PrintStringSmall("DTMF", x, 0, y); strcpy(str, "DTMF");
#endif x += 7 * 2;
UI_PrintStringSmall(str, x, 0, y);
}
} }
UI_DisplayCenterLine(); UI_DisplayCenterLine();

View File

@ -101,9 +101,7 @@ const t_menu_item g_menu_list[] =
#ifdef ENABLE_TX_AUDIO_BAR #ifdef ENABLE_TX_AUDIO_BAR
{"Tx BAR", VOICE_ID_INVALID, MENU_TX_BAR }, {"Tx BAR", VOICE_ID_INVALID, MENU_TX_BAR },
#endif #endif
#ifdef ENABLE_RX_SIGNAL_BAR
{"Rx BAR", VOICE_ID_INVALID, MENU_RX_BAR }, {"Rx BAR", VOICE_ID_INVALID, MENU_RX_BAR },
#endif
{"1 CALL", VOICE_ID_INVALID, MENU_1_CALL }, {"1 CALL", VOICE_ID_INVALID, MENU_1_CALL },
{"SLIST", VOICE_ID_INVALID, MENU_S_LIST }, {"SLIST", VOICE_ID_INVALID, MENU_S_LIST },
{"SLIST1", VOICE_ID_INVALID, MENU_SLIST1 }, {"SLIST1", VOICE_ID_INVALID, MENU_SLIST1 },
@ -805,11 +803,9 @@ void UI_DisplayMenu(void)
break; break;
#endif #endif
#ifdef ENABLE_RX_SIGNAL_BAR
case MENU_RX_BAR: case MENU_RX_BAR:
strcpy(str, g_sub_menu_off_on[g_sub_menu_selection]); strcpy(str, g_sub_menu_off_on[g_sub_menu_selection]);
break; break;
#endif
#ifdef ENABLE_AM_FIX #ifdef ENABLE_AM_FIX
// case MENU_AM_FIX: // case MENU_AM_FIX:

View File

@ -91,9 +91,7 @@ enum
#ifdef ENABLE_TX_AUDIO_BAR #ifdef ENABLE_TX_AUDIO_BAR
MENU_TX_BAR, MENU_TX_BAR,
#endif #endif
#ifdef ENABLE_RX_SIGNAL_BAR
MENU_RX_BAR, MENU_RX_BAR,
#endif
MENU_S_LIST, MENU_S_LIST,
MENU_SLIST1, MENU_SLIST1,
MENU_SLIST2, MENU_SLIST2,