0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-29 23:01:26 +03:00
This commit is contained in:
OneOfEleven 2023-11-07 09:11:52 +00:00
parent c64744e1c5
commit 789e9e4808
3 changed files with 13 additions and 12 deletions

Binary file not shown.

Binary file not shown.

View File

@ -401,14 +401,15 @@ void UI_DisplayMain(void)
const unsigned int line0 = 0; // text screen line const unsigned int line0 = 0; // text screen line
const unsigned int line1 = 4; const unsigned int line1 = 4;
int single_vfo = -1; int single_vfo = -1;
int channel = g_eeprom.config.setting.tx_vfo_num; int main_vfo_num = g_eeprom.config.setting.tx_vfo_num;
int current_vfo_num = g_eeprom.config.setting.tx_vfo_num;
char str[22]; char str[22];
int vfo_num; int vfo_num;
g_center_line = CENTER_LINE_NONE; g_center_line = CENTER_LINE_NONE;
if (g_eeprom.config.setting.dual_watch != DUAL_WATCH_OFF && g_rx_vfo_is_active) if (g_eeprom.config.setting.dual_watch != DUAL_WATCH_OFF && g_rx_vfo_is_active)
channel = g_rx_vfo_num; // we're currently monitoring the other VFO current_vfo_num = g_rx_vfo_num; // we're currently monitoring the other VFO
// if (g_eeprom.config.setting.dual_watch == DUAL_WATCH_OFF && g_eeprom.config.setting.cross_vfo == CROSS_BAND_OFF) // if (g_eeprom.config.setting.dual_watch == DUAL_WATCH_OFF && g_eeprom.config.setting.cross_vfo == CROSS_BAND_OFF)
// single_vfo = g_eeprom.config.setting.tx_vfo_num; // single_vfo = g_eeprom.config.setting.tx_vfo_num;
@ -450,7 +451,7 @@ void UI_DisplayMain(void)
if (single_vfo >= 0 && single_vfo != vfo_num) if (single_vfo >= 0 && single_vfo != vfo_num)
continue; // we're in single VFO mode - screen is dedicated to just one VFO continue; // we're in single VFO mode - screen is dedicated to just one VFO
if (channel != vfo_num) if (current_vfo_num != vfo_num)
{ {
if (g_dtmf_call_state != DTMF_CALL_STATE_NONE || g_dtmf_is_tx || g_dtmf_input_mode) if (g_dtmf_call_state != DTMF_CALL_STATE_NONE || g_dtmf_is_tx || g_dtmf_input_mode)
{ // show DTMF stuff { // show DTMF stuff
@ -515,7 +516,7 @@ void UI_DisplayMain(void)
} }
// highlight the selected/used VFO with a marker // highlight the selected/used VFO with a marker
// if (single_vfo < 0 && channel == vfo_num) // if (single_vfo < 0 && current_vfo_num == vfo_num)
// memcpy(p_line0 + 0, BITMAP_VFO_DEFAULT, sizeof(BITMAP_VFO_DEFAULT)); // memcpy(p_line0 + 0, BITMAP_VFO_DEFAULT, sizeof(BITMAP_VFO_DEFAULT));
// else // else
if (g_eeprom.config.setting.cross_vfo != CROSS_BAND_OFF) if (g_eeprom.config.setting.cross_vfo != CROSS_BAND_OFF)
@ -524,7 +525,7 @@ void UI_DisplayMain(void)
else else
if (single_vfo < 0) if (single_vfo < 0)
{ // highlight the selected/used VFO with a marker { // highlight the selected/used VFO with a marker
if (channel == vfo_num) if (current_vfo_num == vfo_num && current_vfo_num == main_vfo_num)
memcpy(p_line0 + 0, BITMAP_VFO_DEFAULT, sizeof(BITMAP_VFO_DEFAULT)); memcpy(p_line0 + 0, BITMAP_VFO_DEFAULT, sizeof(BITMAP_VFO_DEFAULT));
else else
//if (g_eeprom.config.setting.cross_vfo != CROSS_BAND_OFF) //if (g_eeprom.config.setting.cross_vfo != CROSS_BAND_OFF)
@ -540,8 +541,8 @@ void UI_DisplayMain(void)
else else
#endif #endif
{ {
channel = (g_eeprom.config.setting.cross_vfo == CROSS_BAND_OFF) ? g_rx_vfo_num : g_eeprom.config.setting.tx_vfo_num; current_vfo_num = (g_eeprom.config.setting.cross_vfo == CROSS_BAND_OFF) ? g_rx_vfo_num : g_eeprom.config.setting.tx_vfo_num;
if (channel == vfo_num) if (current_vfo_num == vfo_num)
{ // show the TX symbol { // show the TX symbol
mode = 1; mode = 1;
#ifdef ENABLE_SMALL_BOLD #ifdef ENABLE_SMALL_BOLD
@ -633,8 +634,8 @@ void UI_DisplayMain(void)
uint32_t frequency = g_vfo_info[vfo_num].p_rx->frequency; uint32_t frequency = g_vfo_info[vfo_num].p_rx->frequency;
if (g_current_function == FUNCTION_TRANSMIT) if (g_current_function == FUNCTION_TRANSMIT)
{ // transmitting { // transmitting
channel = (g_eeprom.config.setting.cross_vfo == CROSS_BAND_OFF) ? g_rx_vfo_num : g_eeprom.config.setting.tx_vfo_num; current_vfo_num = (g_eeprom.config.setting.cross_vfo == CROSS_BAND_OFF) ? g_rx_vfo_num : g_eeprom.config.setting.tx_vfo_num;
if (channel == vfo_num) if (current_vfo_num == vfo_num)
frequency = g_vfo_info[vfo_num].p_tx->frequency; frequency = g_vfo_info[vfo_num].p_tx->frequency;
} }