0
mirror of https://github.com/OneOfEleven/uv-k5-firmware-custom.git synced 2025-04-28 14:21:25 +03:00

Modify scanlist top status bar symbol

This commit is contained in:
OneOfEleven 2023-10-04 20:05:00 +01:00
parent 6a8c7d5b37
commit 32fad129cc
5 changed files with 66 additions and 23 deletions

View File

@ -281,7 +281,7 @@ const uint8_t BITMAP_TDR2[12] =
0b00110001 0b00110001
}; };
#endif #endif
/*
const uint8_t BITMAP_SC1[8] = const uint8_t BITMAP_SC1[8] =
{ // "I" { // "I"
0b01000001, 0b01000001,
@ -305,7 +305,30 @@ const uint8_t BITMAP_SC2[8] =
0b01000001, 0b01000001,
0b00000000 0b00000000
}; };
*/
/*
const uint8_t BITMAP_SC1[7] =
{ // "1"
0b01000000,
0b01000000,
0b01000110,
0b01111111,
0b01000000,
0b01000000,
0b00000000
};
const uint8_t BITMAP_SC2[7] =
{ // "2"
0b01000010,
0b01100001,
0b01010001,
0b01001001,
0b01001001,
0b01000110,
0b00000000
};
*/
const uint8_t BITMAP_Antenna[5] = const uint8_t BITMAP_Antenna[5] =
{ {
0b00000011, 0b00000011,

View File

@ -46,8 +46,10 @@ extern const uint8_t BITMAP_TDR2[12];
extern const uint8_t BITMAP_NOAA[12]; extern const uint8_t BITMAP_NOAA[12];
#endif #endif
extern const uint8_t BITMAP_SC1[8]; //extern const uint8_t BITMAP_SC1[8];
extern const uint8_t BITMAP_SC2[8]; //extern const uint8_t BITMAP_SC2[8];
//extern const uint8_t BITMAP_SC1[7];
//extern const uint8_t BITMAP_SC2[7];
extern const uint8_t BITMAP_Antenna[5]; extern const uint8_t BITMAP_Antenna[5];
extern const uint8_t BITMAP_AntennaLevel1[3]; extern const uint8_t BITMAP_AntennaLevel1[3];

Binary file not shown.

Binary file not shown.

View File

@ -97,12 +97,16 @@ void UI_DisplayStatus(const bool test_display)
if (gScanState != SCAN_OFF || gScreenToDisplay == DISPLAY_SCANNER || test_display) if (gScanState != SCAN_OFF || gScreenToDisplay == DISPLAY_SCANNER || test_display)
{ {
if (gEeprom.SCAN_LIST_DEFAULT == 0) if (gEeprom.SCAN_LIST_DEFAULT == 0)
memmove(line + x, BITMAP_SC1, sizeof(BITMAP_SC1)); // memmove(line + x, BITMAP_SC1, sizeof(BITMAP_SC1));
UI_PrintStringSmallBuffer("1", line + x);
else else
memmove(line + x, BITMAP_SC2, sizeof(BITMAP_SC2)); // memmove(line + x, BITMAP_SC2, sizeof(BITMAP_SC2));
x1 = x + sizeof(BITMAP_SC1); UI_PrintStringSmallBuffer("2", line + x);
// x1 = x + sizeof(BITMAP_SC1);
x1 = x + 7;
} }
x += sizeof(BITMAP_SC1); // x += sizeof(BITMAP_SC1);
x += 7; // font character width
#ifdef ENABLE_VOICE #ifdef ENABLE_VOICE
// VOICE indicator // VOICE indicator
@ -213,23 +217,37 @@ void UI_DisplayStatus(const bool test_display)
#ifndef ENABLE_REVERSE_BAT_SYMBOL #ifndef ENABLE_REVERSE_BAT_SYMBOL
line += sizeof(BITMAP_BatteryLevel1); line += sizeof(BITMAP_BatteryLevel1);
if (gBatteryDisplayLevel >= 2) {
memmove(line - 4, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel)); const int8_t pos[] = {-4, -7, -10, 13};
if (gBatteryDisplayLevel >= 3) for (unsigned int i = 0; i < ARRAY_SIZE(pos); i++)
memmove(line - 7, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel)); if (gBatteryDisplayLevel >= (2 + i))
if (gBatteryDisplayLevel >= 4) memmove(line + pos[i], BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel));
memmove(line - 10, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel));
if (gBatteryDisplayLevel >= 5) /* switch (gBatteryDisplayLevel)
memmove(line - 13, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel)); {
default:
case 5: memmove(line - 13, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel));
case 4: memmove(line - 10, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel));
case 3: memmove(line - 7, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel));
case 2: memmove(line - 4, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel));
}
*/ }
#else #else
if (gBatteryDisplayLevel >= 2) {
memmove(line + 3, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel)); const int8_t pos[] = {3, 6, 9, 12};
if (gBatteryDisplayLevel >= 3) for (unsigned int i = 0; i < ARRAY_SIZE(pos); i++)
memmove(line + 6, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel)); if (gBatteryDisplayLevel >= (2 + i))
if (gBatteryDisplayLevel >= 4) memmove(line + pos[i], BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel));
memmove(line + 9, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel)); /*
if (gBatteryDisplayLevel >= 5) switch (gBatteryDisplayLevel)
memmove(line + 12, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel)); {
default:
case 5: memmove(line + 12, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel));
case 4: memmove(line + 9, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel));
case 3: memmove(line + 6, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel));
case 2: memmove(line + 3, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel));
}
*/ }
#endif #endif
} }
else else