Fix MAIN ONLY and Classic GUI

This commit is contained in:
Armel FAUVEAU
2024-03-01 19:55:46 +01:00
parent 3e72d855a6
commit a4be6e13a0
4 changed files with 34 additions and 19 deletions

View File

@@ -71,6 +71,12 @@ const uint8_t gFontXB[2][6] =
{0x00, 0x7f, 0x49, 0x49, 0x49, 0x36}, {0x00, 0x7f, 0x49, 0x49, 0x49, 0x36},
}; };
const uint8_t gFontMO[2][6] =
{ // "MO"
{0x00, 0x7f, 0x2, 0x1c, 0x2, 0x7f},
{0x00, 0x3e, 0x41, 0x41, 0x41, 0x3e},
};
const uint8_t gFontDWR[3][6] = const uint8_t gFontDWR[3][6] =
{ // "DWR" { // "DWR"
@@ -81,8 +87,8 @@ const uint8_t gFontDWR[3][6] =
const uint8_t gFontHold[2][5] = const uint8_t gFontHold[2][5] =
{ // "><" .. DW on hold { // "><" .. DW on hold
{0x0, 0x41, 0x22, 0x14, 0x8}, {0x00, 0x41, 0x22, 0x14, 0x8},
{0x0, 0x8, 0x14, 0x22, 0x41}, {0x00, 0x8, 0x14, 0x22, 0x41},
}; };
const uint8_t BITMAP_BatteryLevel[2] = const uint8_t BITMAP_BatteryLevel[2] =

View File

@@ -16,6 +16,7 @@ extern const uint8_t gFontScanAll[10];
extern const uint8_t gFontF[1][7]; extern const uint8_t gFontF[1][7];
*/ */
extern const uint8_t gFontXB[2][6]; extern const uint8_t gFontXB[2][6];
extern const uint8_t gFontMO[2][6];
extern const uint8_t gFontDWR[3][6]; extern const uint8_t gFontDWR[3][6];
extern const uint8_t gFontHold[2][5]; extern const uint8_t gFontHold[2][5];

View File

@@ -1058,7 +1058,7 @@ void UI_DisplayMain(void)
if (code_type < ARRAY_SIZE(code_list)) if (code_type < ARRAY_SIZE(code_list))
s = code_list[code_type]; s = code_list[code_type];
#ifdef ENABLE_FEAT_F4HWN #ifdef ENABLE_FEAT_F4HWN
if(gCurrentFunction != FUNCTION_TRANSMIT) if(gCurrentFunction != FUNCTION_TRANSMIT || activeTxVFO != vfo_num)
t = gModulationStr[mod]; t = gModulationStr[mod];
#endif #endif
break; break;
@@ -1093,8 +1093,11 @@ void UI_DisplayMain(void)
if (isMainOnly(true)) if (isMainOnly(true))
{ {
UI_PrintStringSmallNormal(s, 24, 0, 2); UI_PrintStringSmallNormal(s, LCD_WIDTH + 24, 0, line + 1);
UI_PrintStringSmallNormal(t, 2, 0, 2); UI_PrintStringSmallNormal(t, LCD_WIDTH + 2, 0, line + 1);
if (isMainOnly(false))
{
if(shift == 0) if(shift == 0)
{ {
UI_PrintStringSmallNormal(String, 2, 0, 6); UI_PrintStringSmallNormal(String, 2, 0, 6);
@@ -1110,6 +1113,7 @@ void UI_DisplayMain(void)
} }
UI_PrintStringSmallNormal(String, 46, 0, 6); UI_PrintStringSmallNormal(String, 46, 0, 6);
} }
}
else else
{ {
if ((s != NULL) && (s[0] != '\0')) { if ((s != NULL) && (s[0] != '\0')) {
@@ -1203,8 +1207,8 @@ void UI_DisplayMain(void)
#if ENABLE_FEAT_F4HWN #if ENABLE_FEAT_F4HWN
if (isMainOnly(true)) if (isMainOnly(true))
{ {
if (vfoInfo->CHANNEL_BANDWIDTH == BANDWIDTH_NARROW) const char *bandWidthNames[] = {"W", "N"};
UI_PrintStringSmallNormal("N", LCD_WIDTH + 80, 0, line + 1); UI_PrintStringSmallNormal(bandWidthNames[vfoInfo->CHANNEL_BANDWIDTH], LCD_WIDTH + 80, 0, line + 1);
} }
else else
{ {
@@ -1242,7 +1246,7 @@ void UI_DisplayMain(void)
{ {
sprintf(String, "SQL%d", gEeprom.SQUELCH_LEVEL); sprintf(String, "SQL%d", gEeprom.SQUELCH_LEVEL);
} }
UI_PrintStringSmallNormal(String, 94, 0, 2); UI_PrintStringSmallNormal(String, LCD_WIDTH + 98, 0, line + 1);
} }
else else
{ {

View File

@@ -121,6 +121,10 @@ void UI_DisplayStatus()
else if(dw == 2) { // XB - crossband else if(dw == 2) { // XB - crossband
memcpy(line + x + 2, gFontXB, sizeof(gFontXB)); memcpy(line + x + 2, gFontXB, sizeof(gFontXB));
} }
else
{
memcpy(line + x + 2, gFontMO, sizeof(gFontMO));
}
} }
x += sizeof(gFontDWR) + 3; x += sizeof(gFontDWR) + 3;