mirror of
https://github.com/OneOfEleven/uv-k5-firmware-custom.git
synced 2025-06-19 06:39:49 +03:00
Fixed WX/Cross-band display indicator, some menu renames
This commit is contained in:
@ -46,7 +46,7 @@ void UI_DisplayAircopy(void)
|
||||
{
|
||||
NUMBER_ToDigits(gRxVfo->ConfigRX.Frequency, String);
|
||||
UI_DisplayFrequency(String, 16, 2, 0, 0);
|
||||
UI_DisplaySmallDigits(2, String + 6, 97, 3);
|
||||
UI_DisplaySmallDigits(2, String + 6, 97, 3, true);
|
||||
}
|
||||
else
|
||||
UI_DisplayFrequency(gInputBox, 16, 2, 1, 0);
|
||||
|
18
ui/helper.c
18
ui/helper.c
@ -217,11 +217,21 @@ void UI_DisplayFrequencySmall(const char *pDigits, uint8_t X, uint8_t Y, bool bD
|
||||
}
|
||||
}
|
||||
|
||||
void UI_DisplaySmallDigits(uint8_t Size, const char *pString, uint8_t X, uint8_t Y)
|
||||
void UI_DisplaySmallDigits(const uint8_t size, const char *str, const uint8_t x, const uint8_t y, const bool display_leading_zeros)
|
||||
{
|
||||
const unsigned int char_width = 7;
|
||||
unsigned int x = X;
|
||||
bool display = display_leading_zeros;
|
||||
unsigned int xx;
|
||||
unsigned int i;
|
||||
for (i = 0; i < Size; i++, x += char_width)
|
||||
memcpy(gFrameBuffer[Y] + x, gFontSmallDigits[(unsigned int)pString[i]], char_width);
|
||||
for (i = 0, xx = x; i < size; i++)
|
||||
{
|
||||
const unsigned int c = (unsigned int)str[i];
|
||||
if (c > 0)
|
||||
display = true;
|
||||
if (display && c < ARRAY_SIZE(gFontSmallDigits))
|
||||
{
|
||||
memcpy(gFrameBuffer[y] + xx, gFontSmallDigits[c], char_width);
|
||||
xx += char_width;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ void UI_PrintString(const char *pString, uint8_t Start, uint8_t End, uint8_t Lin
|
||||
void UI_PrintStringSmall(const char *pString, uint8_t Start, uint8_t End, uint8_t Line);
|
||||
void UI_DisplayFrequency(const char *pDigits, uint8_t X, uint8_t Y, bool bDisplayLeadingZero, bool bFlag);
|
||||
void UI_DisplayFrequencySmall(const char *pDigits, uint8_t X, uint8_t Y, bool bDisplayLeadingZero);
|
||||
void UI_DisplaySmallDigits(uint8_t Size, const char *pString, uint8_t X, uint8_t Y);
|
||||
void UI_DisplaySmallDigits(const uint8_t size, const char *str, const uint8_t x, const uint8_t y, const bool display_leading_zeros);
|
||||
|
||||
#endif
|
||||
|
||||
|
15
ui/main.c
15
ui/main.c
@ -116,8 +116,9 @@ void UI_DisplayMain(void)
|
||||
// highlight the selected/used VFO with a marker
|
||||
if (!single_vfo && bIsSameVfo)
|
||||
memcpy(pLine0 + 2, BITMAP_VFO_Default, sizeof(BITMAP_VFO_Default));
|
||||
//else
|
||||
// memcpy(pLine0 + 2, BITMAP_VFO_NotDefault, sizeof(BITMAP_VFO_NotDefault));
|
||||
else
|
||||
if (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF)
|
||||
memcpy(pLine0 + 2, BITMAP_VFO_NotDefault, sizeof(BITMAP_VFO_NotDefault));
|
||||
}
|
||||
else
|
||||
if (!single_vfo)
|
||||
@ -169,7 +170,7 @@ void UI_DisplayMain(void)
|
||||
NUMBER_ToDigits(gEeprom.ScreenChannel[vfo_num] + 1, String);
|
||||
else
|
||||
memcpy(String + 5, gInputBox, 3);
|
||||
UI_DisplaySmallDigits(3, String + 5, x + sizeof(BITMAP_M), Line + 1);
|
||||
UI_DisplaySmallDigits(3, String + 5, x + sizeof(BITMAP_M), Line + 1, false);
|
||||
}
|
||||
else
|
||||
if (IS_FREQ_CHANNEL(gEeprom.ScreenChannel[vfo_num]))
|
||||
@ -179,7 +180,7 @@ void UI_DisplayMain(void)
|
||||
char c;
|
||||
memcpy(pLine1 + x, BITMAP_FB, sizeof(BITMAP_FB));
|
||||
c = (gEeprom.ScreenChannel[vfo_num] - FREQ_CHANNEL_FIRST) + 1;
|
||||
UI_DisplaySmallDigits(1, &c, x + sizeof(BITMAP_FB), Line + 1);
|
||||
UI_DisplaySmallDigits(1, &c, x + sizeof(BITMAP_FB), Line + 1, false);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -195,7 +196,7 @@ void UI_DisplayMain(void)
|
||||
String[6] = gInputBox[0];
|
||||
String[7] = gInputBox[1];
|
||||
}
|
||||
UI_DisplaySmallDigits(2, String + 6, 15, Line + 1);
|
||||
UI_DisplaySmallDigits(2, String + 6, 15, Line + 1, true);
|
||||
}
|
||||
|
||||
// ************
|
||||
@ -285,7 +286,7 @@ void UI_DisplayMain(void)
|
||||
// show the main large frequency digits
|
||||
UI_DisplayFrequency(String, 31, Line, false, false);
|
||||
// show the remaining 2 small frequency digits
|
||||
UI_DisplaySmallDigits(2, String + 6, 112, Line + 1);
|
||||
UI_DisplaySmallDigits(2, String + 6, 112, Line + 1, true);
|
||||
#else
|
||||
// show the frequency in the main font
|
||||
sprintf(String, "%9.5f", frequency_Hz * 0.00001);
|
||||
@ -346,7 +347,7 @@ void UI_DisplayMain(void)
|
||||
// show the main large frequency digits
|
||||
UI_DisplayFrequency(String, 31, Line, false, false);
|
||||
// show the remaining 2 small frequency digits
|
||||
UI_DisplaySmallDigits(2, String + 6, 112, Line + 1);
|
||||
UI_DisplaySmallDigits(2, String + 6, 112, Line + 1, true);
|
||||
#else
|
||||
// show the frequency in the main font
|
||||
sprintf(String, "%9.5f", frequency_Hz * 0.00001);
|
||||
|
40
ui/menu.c
40
ui/menu.c
@ -34,22 +34,22 @@ static const char MenuList[][7] =
|
||||
{
|
||||
"SQL",
|
||||
"STEP",
|
||||
"TX-PWR",
|
||||
"R_DCS",
|
||||
"R_CTCS",
|
||||
"T_DCS",
|
||||
"T_CTCS",
|
||||
"TX-PWR", // was "TXP"
|
||||
"R-DCS", // was "R_DCS"
|
||||
"R-CTCS", // was "R_CTCS"
|
||||
"T-DCS", // was "T_DCS"
|
||||
"T-CTCS", // was "T_CTCS"
|
||||
"SFT-D",
|
||||
"OFFSET",
|
||||
"W/N",
|
||||
"SCRAM",
|
||||
"SCRAM", // was "SCR"
|
||||
"BCL",
|
||||
"MEM-CH",
|
||||
"B-SAVE",
|
||||
"B-SAVE", // was "SAVE"
|
||||
"VOX",
|
||||
"BAK-LT",
|
||||
"TDR",
|
||||
"CROS-B",
|
||||
"BAK-LT", // was "ABR"
|
||||
"DUAL-W", // was "TDR"
|
||||
"CROS-B", // was "WX"
|
||||
"BEEP",
|
||||
"TOT",
|
||||
#ifndef DISABLE_VOICE
|
||||
@ -82,8 +82,8 @@ static const char MenuList[][7] =
|
||||
"D-LIST",
|
||||
"PONMSG",
|
||||
"ROGER",
|
||||
"BATVOL",
|
||||
"MODE",
|
||||
"BATVOL", // was "VOL"
|
||||
"MODE", // was "AM"
|
||||
#ifndef DISABLE_NOAA
|
||||
"NOAA_S",
|
||||
#endif
|
||||
@ -93,12 +93,12 @@ static const char MenuList[][7] =
|
||||
// normally hidden menu items from here on.
|
||||
// enabled if pressing PTT and side button below PTT at power-on.
|
||||
|
||||
"350TX",
|
||||
"350-TX", // was "350TX"
|
||||
"F-LOCK",
|
||||
"200TX",
|
||||
"500TX",
|
||||
"350EN",
|
||||
"SCREN"
|
||||
"200-TX", // was "200TX"
|
||||
"500-TX", // was "500TX"
|
||||
"350-EN", // was "350EN"
|
||||
"SCR-EN" // was "SCREN"
|
||||
};
|
||||
|
||||
#if 0
|
||||
@ -293,7 +293,7 @@ void UI_DisplayMenu(void)
|
||||
#endif
|
||||
|
||||
NUMBER_ToDigits(gMenuCursor + 1, String);
|
||||
UI_DisplaySmallDigits(2, String + 6, 33, 6);
|
||||
UI_DisplaySmallDigits(2, String + 6, 33, 6, false);
|
||||
|
||||
if (gIsInSubMenu)
|
||||
memcpy(gFrameBuffer[0] + 50, BITMAP_CurrentIndicator, sizeof(BITMAP_CurrentIndicator));
|
||||
@ -628,10 +628,10 @@ void UI_DisplayMenu(void)
|
||||
gMenuCursor == MENU_T_DCS ||
|
||||
gMenuCursor == MENU_D_LIST)
|
||||
{
|
||||
uint8_t Offset;
|
||||
unsigned int Offset;
|
||||
NUMBER_ToDigits((uint8_t)gSubMenuSelection, String);
|
||||
Offset = (gMenuCursor == MENU_D_LIST) ? 2 : 3;
|
||||
UI_DisplaySmallDigits(Offset, String + (8 - Offset), 105, 0);
|
||||
UI_DisplaySmallDigits(Offset, String + (8 - Offset), 105, 0, false);
|
||||
}
|
||||
|
||||
if (gMenuCursor == MENU_SLIST1 || gMenuCursor == MENU_SLIST2)
|
||||
|
Reference in New Issue
Block a user