mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-04-28 22:31:25 +03:00
fixed audio line, MDC etc center line in single VFO mode
This commit is contained in:
parent
11626d232c
commit
e83aac104f
BIN
firmware.bin
BIN
firmware.bin
Binary file not shown.
Binary file not shown.
27
ui/main.c
27
ui/main.c
@ -118,7 +118,11 @@ void draw_bar(uint8_t *line, const int len, const int max_width)
|
|||||||
|
|
||||||
if (g_eeprom.config.setting.mic_bar)
|
if (g_eeprom.config.setting.mic_bar)
|
||||||
{
|
{
|
||||||
const unsigned int line = 3;
|
#ifdef ENABLE_SINGLE_VFO_CHAN
|
||||||
|
const unsigned int line = (single_vfo >= 0 && !pan_enabled) ? 6 : 3;
|
||||||
|
#else
|
||||||
|
const unsigned int line = 3;
|
||||||
|
#endif
|
||||||
const unsigned int txt_width = 7 * 3; // 3 text chars
|
const unsigned int txt_width = 7 * 3; // 3 text chars
|
||||||
const unsigned int bar_x = 2 + txt_width + 4; // X coord of bar graph
|
const unsigned int bar_x = 2 + txt_width + 4; // X coord of bar graph
|
||||||
const unsigned int bar_width = LCD_WIDTH - 1 - bar_x;
|
const unsigned int bar_width = LCD_WIDTH - 1 - bar_x;
|
||||||
@ -517,6 +521,15 @@ void UI_DisplayCenterLine(void)
|
|||||||
// const bool rx = (g_current_function == FUNCTION_RECEIVE && g_squelch_open) ? true : false;
|
// const bool rx = (g_current_function == FUNCTION_RECEIVE && g_squelch_open) ? true : false;
|
||||||
const bool rx = (g_current_function == FUNCTION_RECEIVE) ? true : false;
|
const bool rx = (g_current_function == FUNCTION_RECEIVE) ? true : false;
|
||||||
|
|
||||||
|
#ifdef ENABLE_SINGLE_VFO_CHAN
|
||||||
|
const unsigned int line = (single_vfo >= 0 && !pan_enabled) ? 6 : 3;
|
||||||
|
#else
|
||||||
|
const unsigned int line = 3;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
(void)rx;
|
||||||
|
(void)line;
|
||||||
|
|
||||||
if (g_center_line != CENTER_LINE_NONE ||
|
if (g_center_line != CENTER_LINE_NONE ||
|
||||||
g_current_display_screen != DISPLAY_MAIN ||
|
g_current_display_screen != DISPLAY_MAIN ||
|
||||||
g_dtmf_call_state != DTMF_CALL_STATE_NONE)
|
g_dtmf_call_state != DTMF_CALL_STATE_NONE)
|
||||||
@ -545,9 +558,9 @@ void UI_DisplayCenterLine(void)
|
|||||||
sprintf(str, "MDC1200 ID %04X", mdc1200_unit_id);
|
sprintf(str, "MDC1200 ID %04X", mdc1200_unit_id);
|
||||||
#endif
|
#endif
|
||||||
#ifdef ENABLE_SMALL_BOLD
|
#ifdef ENABLE_SMALL_BOLD
|
||||||
UI_PrintStringSmallBold(str, 2, 0, 3);
|
UI_PrintStringSmallBold(str, 2, 0, line);
|
||||||
#else
|
#else
|
||||||
UI_PrintStringSmall(str, 2, 0, 3);
|
UI_PrintStringSmall(str, 2, 0, line);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@ -559,7 +572,7 @@ void UI_DisplayCenterLine(void)
|
|||||||
{
|
{
|
||||||
g_center_line = CENTER_LINE_AM_FIX_DATA;
|
g_center_line = CENTER_LINE_AM_FIX_DATA;
|
||||||
AM_fix_print_data(g_rx_vfo_num, str);
|
AM_fix_print_data(g_rx_vfo_num, str);
|
||||||
UI_PrintStringSmall(str, 2, 0, 3);
|
UI_PrintStringSmall(str, 2, 0, line);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
#endif
|
#endif
|
||||||
@ -591,7 +604,7 @@ void UI_DisplayCenterLine(void)
|
|||||||
|
|
||||||
strcpy(str, "DTMF ");
|
strcpy(str, "DTMF ");
|
||||||
strcat(str, g_dtmf_rx_live + idx);
|
strcat(str, g_dtmf_rx_live + idx);
|
||||||
UI_PrintStringSmall(str, 2, 0, 3);
|
UI_PrintStringSmall(str, 2, 0, line);
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
if (g_eeprom.config.setting.dtmf_live_decoder && g_dtmf_rx_index > 0)
|
if (g_eeprom.config.setting.dtmf_live_decoder && g_dtmf_rx_index > 0)
|
||||||
@ -606,7 +619,7 @@ void UI_DisplayCenterLine(void)
|
|||||||
|
|
||||||
strcpy(str, "DTMF ");
|
strcpy(str, "DTMF ");
|
||||||
strcat(str, g_dtmf_rx + idx);
|
strcat(str, g_dtmf_rx + idx);
|
||||||
UI_PrintStringSmall(str, 2, 0, 3);
|
UI_PrintStringSmall(str, 2, 0, line);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
@ -623,7 +636,7 @@ void UI_DisplayCenterLine(void)
|
|||||||
sprintf(str, "Charge %u.%02uV %u%%",
|
sprintf(str, "Charge %u.%02uV %u%%",
|
||||||
g_battery_voltage_average / 100, g_battery_voltage_average % 100,
|
g_battery_voltage_average / 100, g_battery_voltage_average % 100,
|
||||||
BATTERY_VoltsToPercent(g_battery_voltage_average));
|
BATTERY_VoltsToPercent(g_battery_voltage_average));
|
||||||
UI_PrintStringSmall(str, 2, 0, 3);
|
UI_PrintStringSmall(str, 2, 0, line);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user