mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-19 14:48:03 +03:00
AM RX mode could possible not be being set - maybe fixed
This commit is contained in:
33
ui/main.c
33
ui/main.c
@ -335,7 +335,7 @@ void UI_DisplayMain(void)
|
||||
const bool same_vfo = (channel == vfo_num) ? true : false;
|
||||
uint8_t *p_line0 = gFrameBuffer[line + 0];
|
||||
uint8_t *p_line1 = gFrameBuffer[line + 1];
|
||||
uint32_t duff_beer = 0;
|
||||
uint8_t mode = 0;
|
||||
uint8_t state;
|
||||
|
||||
if (single_vfo)
|
||||
@ -422,23 +422,36 @@ void UI_DisplayMain(void)
|
||||
|
||||
#ifdef ENABLE_ALARM
|
||||
if (gAlarmState == ALARM_STATE_ALARM)
|
||||
duff_beer = 2;
|
||||
mode = 2;
|
||||
else
|
||||
#endif
|
||||
{
|
||||
channel = (gEeprom.CROSS_BAND_RX_TX == CROSS_BAND_OFF) ? gEeprom.RX_CHANNEL : gEeprom.TX_CHANNEL;
|
||||
if (channel == vfo_num)
|
||||
{ // show the TX symbol
|
||||
duff_beer = 1;
|
||||
UI_PrintStringSmall("TX", 14, 0, line);
|
||||
mode = 1;
|
||||
#ifdef ENABLE_SMALL_BOLD
|
||||
UI_PrintStringSmallBold("TX", 14, 0, line);
|
||||
#else
|
||||
UI_PrintStringSmall("TX", 14, 0, line);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{ // receiving .. show the RX symbol
|
||||
duff_beer = 2;
|
||||
if ((gCurrentFunction == FUNCTION_RECEIVE || gCurrentFunction == FUNCTION_MONITOR) && gEeprom.RX_CHANNEL == vfo_num)
|
||||
UI_PrintStringSmall("RX", 14, 0, line);
|
||||
mode = 2;
|
||||
if ((gCurrentFunction == FUNCTION_RECEIVE ||
|
||||
gCurrentFunction == FUNCTION_MONITOR ||
|
||||
gCurrentFunction == FUNCTION_INCOMING) &&
|
||||
gEeprom.RX_CHANNEL == vfo_num)
|
||||
{
|
||||
#ifdef ENABLE_SMALL_BOLD
|
||||
UI_PrintStringSmallBold("RX", 14, 0, line);
|
||||
#else
|
||||
UI_PrintStringSmall("RX", 14, 0, line);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
if (IS_MR_CHANNEL(gEeprom.ScreenChannel[vfo_num]))
|
||||
@ -610,7 +623,7 @@ void UI_DisplayMain(void)
|
||||
{ // show the TX/RX level
|
||||
uint8_t Level = 0;
|
||||
|
||||
if (duff_beer == 1)
|
||||
if (mode == 1)
|
||||
{ // TX power level
|
||||
switch (gRxVfo->OUTPUT_POWER)
|
||||
{
|
||||
@ -620,7 +633,7 @@ void UI_DisplayMain(void)
|
||||
}
|
||||
}
|
||||
else
|
||||
if (duff_beer == 2)
|
||||
if (mode == 2)
|
||||
{ // RX signal level
|
||||
#ifndef ENABLE_RSSI_BAR
|
||||
// bar graph
|
||||
@ -657,7 +670,7 @@ void UI_DisplayMain(void)
|
||||
}
|
||||
else
|
||||
{ // or show the CTCSS/DCS symbol
|
||||
const FREQ_Config_t *pConfig = (duff_beer == 1) ? gEeprom.VfoInfo[vfo_num].pTX : gEeprom.VfoInfo[vfo_num].pRX;
|
||||
const FREQ_Config_t *pConfig = (mode == 1) ? gEeprom.VfoInfo[vfo_num].pTX : gEeprom.VfoInfo[vfo_num].pRX;
|
||||
const unsigned int code_type = pConfig->CodeType;
|
||||
const char *code_list[] = {"", "CT", "DCS", "DCR"};
|
||||
if (code_type >= 0 && code_type < ARRAY_SIZE(code_list))
|
||||
|
20
ui/status.c
20
ui/status.c
@ -45,12 +45,26 @@ void UI_DisplayStatus(const bool test_display)
|
||||
// **************
|
||||
|
||||
// POWER-SAVE indicator
|
||||
if (gCurrentFunction == FUNCTION_TRANSMIT)
|
||||
{
|
||||
memmove(line + x, BITMAP_TX, sizeof(BITMAP_TX));
|
||||
x1 = x + sizeof(BITMAP_TX);
|
||||
}
|
||||
else
|
||||
if (gCurrentFunction == FUNCTION_RECEIVE ||
|
||||
gCurrentFunction == FUNCTION_MONITOR ||
|
||||
gCurrentFunction == FUNCTION_INCOMING)
|
||||
{
|
||||
memmove(line + x, BITMAP_RX, sizeof(BITMAP_RX));
|
||||
x1 = x + sizeof(BITMAP_RX);
|
||||
}
|
||||
else
|
||||
if (gCurrentFunction == FUNCTION_POWER_SAVE || test_display)
|
||||
{
|
||||
memmove(line + x, BITMAP_PowerSave, sizeof(BITMAP_PowerSave));
|
||||
x1 = x + sizeof(BITMAP_PowerSave);
|
||||
memmove(line + x, BITMAP_POWERSAVE, sizeof(BITMAP_POWERSAVE));
|
||||
x1 = x + sizeof(BITMAP_POWERSAVE);
|
||||
}
|
||||
x += sizeof(BITMAP_PowerSave);
|
||||
x += sizeof(BITMAP_POWERSAVE);
|
||||
|
||||
#ifdef ENABLE_NOAA
|
||||
// NOASS SCAN indicator
|
||||
|
Reference in New Issue
Block a user