From 68122588505b2bfc646ba6f74e585f5f1bfdfc83 Mon Sep 17 00:00:00 2001 From: Armel FAUVEAU Date: Thu, 14 Nov 2024 01:45:59 +0100 Subject: [PATCH] Add bitmap --- bitmaps.c | 33 +++++++++++++++++++++++++++------ bitmaps.h | 11 ++++++++--- ui/status.c | 5 +++++ 3 files changed, 40 insertions(+), 9 deletions(-) diff --git a/bitmaps.c b/bitmaps.c index 088007b..8aac5f7 100644 --- a/bitmaps.c +++ b/bitmaps.c @@ -22,19 +22,40 @@ const uint8_t gFontPttClassic[2][6] = {0x00, 0x7f, 0x40, 0x40, 0x40, 0x40}, }; -const uint8_t gFontF[1][8] = +const uint8_t gFontF[8] = { - {0x7f, 0x00, 0x76, 0x76, 0x76, 0x76, 0x7e, 0x7f}, // 'F' + 0b01111111, + 0b00000000, + 0b01110110, + 0b01110110, + 0b01110110, + 0b01110110, + 0b01111110, + 0b01111111 }; -const uint8_t gFontS[1][6] = +#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK + const uint8_t gFontR[8] = + { + 0b01111111, + 0b00000000, + 0b01110110, + 0b01110110, + 0b01100110, + 0b01010110, + 0b00111001, + 0b01111111 + }; +#endif + +const uint8_t gFontS[6] = { - {0x26, 0x49, 0x49, 0x49, 0x49, 0x32}, // 'S' + 0x26, 0x49, 0x49, 0x49, 0x49, 0x32 // 'S' }; -const uint8_t gFontKeyLock[1][9] = +const uint8_t gFontKeyLock[9] = { - {0x7c, 0x46, 0x45, 0x45, 0x45, 0x45, 0x45, 0x46, 0x7c} + 0x7c, 0x46, 0x45, 0x45, 0x45, 0x45, 0x45, 0x46, 0x7c }; const uint8_t gFontLight[9] = diff --git a/bitmaps.h b/bitmaps.h index b821a6c..e67f0d4 100644 --- a/bitmaps.h +++ b/bitmaps.h @@ -7,10 +7,15 @@ extern const uint8_t gFontPowerSave[2][6]; extern const uint8_t gFontPttOnePush[2][6]; extern const uint8_t gFontPttClassic[2][6]; -extern const uint8_t gFontF[1][8]; -extern const uint8_t gFontS[1][6]; +extern const uint8_t gFontF[8]; -extern const uint8_t gFontKeyLock[1][9]; +#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK + extern const uint8_t gFontR[8]; +#endif + +extern const uint8_t gFontS[6]; + +extern const uint8_t gFontKeyLock[9]; extern const uint8_t gFontLight[9]; extern const uint8_t gFontXB[2][6]; diff --git a/ui/status.c b/ui/status.c index f3b1272..fb25df6 100644 --- a/ui/status.c +++ b/ui/status.c @@ -213,6 +213,11 @@ void UI_DisplayStatus() } */ } +#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK + else if(gEeprom.MENU_LOCK == true) { + memcpy(line + x + 1, gFontR, sizeof(gFontR)); + } +#endif else if (gBackLight) { memcpy(line + x + 1, gFontLight, sizeof(gFontLight));