diff --git a/bitmaps.c b/bitmaps.c index 9487980..9bc4252 100644 --- a/bitmaps.c +++ b/bitmaps.c @@ -281,7 +281,7 @@ const uint8_t BITMAP_TDR2[12] = 0b00110001 }; #endif - +/* const uint8_t BITMAP_SC1[8] = { // "I" 0b01000001, @@ -305,7 +305,30 @@ const uint8_t BITMAP_SC2[8] = 0b01000001, 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] = { 0b00000011, diff --git a/bitmaps.h b/bitmaps.h index f7ba9c3..ab0d979 100644 --- a/bitmaps.h +++ b/bitmaps.h @@ -46,8 +46,10 @@ extern const uint8_t BITMAP_TDR2[12]; extern const uint8_t BITMAP_NOAA[12]; #endif -extern const uint8_t BITMAP_SC1[8]; -extern const uint8_t BITMAP_SC2[8]; +//extern const uint8_t BITMAP_SC1[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_AntennaLevel1[3]; diff --git a/firmware.bin b/firmware.bin index a751cc6..9c015a8 100644 Binary files a/firmware.bin and b/firmware.bin differ diff --git a/firmware.packed.bin b/firmware.packed.bin index 92b92ec..8d01210 100644 Binary files a/firmware.packed.bin and b/firmware.packed.bin differ diff --git a/ui/status.c b/ui/status.c index 075f02a..b1e94bc 100644 --- a/ui/status.c +++ b/ui/status.c @@ -97,12 +97,16 @@ void UI_DisplayStatus(const bool test_display) if (gScanState != SCAN_OFF || gScreenToDisplay == DISPLAY_SCANNER || test_display) { 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 - memmove(line + x, BITMAP_SC2, sizeof(BITMAP_SC2)); - x1 = x + sizeof(BITMAP_SC1); +// memmove(line + x, BITMAP_SC2, sizeof(BITMAP_SC2)); + 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 // VOICE indicator @@ -213,23 +217,37 @@ void UI_DisplayStatus(const bool test_display) #ifndef ENABLE_REVERSE_BAT_SYMBOL line += sizeof(BITMAP_BatteryLevel1); - if (gBatteryDisplayLevel >= 2) - memmove(line - 4, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel)); - if (gBatteryDisplayLevel >= 3) - memmove(line - 7, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel)); - if (gBatteryDisplayLevel >= 4) - memmove(line - 10, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel)); - if (gBatteryDisplayLevel >= 5) - memmove(line - 13, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel)); + { + const int8_t pos[] = {-4, -7, -10, 13}; + for (unsigned int i = 0; i < ARRAY_SIZE(pos); i++) + if (gBatteryDisplayLevel >= (2 + i)) + memmove(line + pos[i], BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel)); + +/* switch (gBatteryDisplayLevel) + { + 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 - if (gBatteryDisplayLevel >= 2) - memmove(line + 3, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel)); - if (gBatteryDisplayLevel >= 3) - memmove(line + 6, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel)); - if (gBatteryDisplayLevel >= 4) - memmove(line + 9, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel)); - if (gBatteryDisplayLevel >= 5) - memmove(line + 12, BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel)); + { + const int8_t pos[] = {3, 6, 9, 12}; + for (unsigned int i = 0; i < ARRAY_SIZE(pos); i++) + if (gBatteryDisplayLevel >= (2 + i)) + memmove(line + pos[i], BITMAP_BatteryLevel, sizeof(BITMAP_BatteryLevel)); +/* + switch (gBatteryDisplayLevel) + { + 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 } else