From a1285a12f5ae45683135031b9c636b1683f88908 Mon Sep 17 00:00:00 2001 From: Armel FAUVEAU Date: Sat, 16 Nov 2024 02:54:29 +0100 Subject: [PATCH] Change R to RO --- bitmaps.c | 23 +++++++++-------------- bitmaps.h | 8 +++----- ui/status.c | 35 ++++++++++++++++++++--------------- 3 files changed, 32 insertions(+), 34 deletions(-) diff --git a/bitmaps.c b/bitmaps.c index 9428600..c6e7a66 100644 --- a/bitmaps.c +++ b/bitmaps.c @@ -34,20 +34,6 @@ const uint8_t gFontF[8] = 0b01111111 }; -#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' @@ -77,6 +63,7 @@ const uint8_t gFontXB[2][6] = {0x00, 0x7f, 0x49, 0x49, 0x49, 0x36}, }; + const uint8_t gFontMO[2][6] = { // "MO" {0x00, 0x7f, 0x2, 0x1c, 0x2, 0x7f}, @@ -91,6 +78,14 @@ const uint8_t gFontDWR[3][6] = {0x00, 0x7f, 0x9, 0x19, 0x29, 0x46}, }; +#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK + const uint8_t gFontRO[2][6] = + { // "RO" + {0x00, 0x7f, 0x9, 0x19, 0x29, 0x46}, + {0x00, 0x3e, 0x41, 0x41, 0x41, 0x3e}, + }; +#endif + const uint8_t gFontHold[2][5] = { // "><" .. DW on hold {0x00, 0x41, 0x22, 0x14, 0x8}, diff --git a/bitmaps.h b/bitmaps.h index 92b6629..64b6ca2 100644 --- a/bitmaps.h +++ b/bitmaps.h @@ -8,11 +8,6 @@ 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[8]; - -#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]; @@ -21,6 +16,9 @@ extern const uint8_t gFontLight[9]; extern const uint8_t gFontXB[2][6]; extern const uint8_t gFontMO[2][6]; extern const uint8_t gFontDWR[3][6]; +#ifdef ENABLE_FEAT_F4HWN_MENU_LOCK + extern const uint8_t gFontRO[2][6]; +#endif extern const uint8_t gFontHold[2][5]; extern const uint8_t BITMAP_BatteryLevel[2]; diff --git a/ui/status.c b/ui/status.c index fb25df6..d9ebddd 100644 --- a/ui/status.c +++ b/ui/status.c @@ -154,20 +154,30 @@ void UI_DisplayStatus() else #endif { - uint8_t dw = (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2; - if(dw == 1 || dw == 3) { // DWR - dual watch + respond - if(gDualWatchActive) - memcpy(line + x + (dw==1?0:2), gFontDWR, sizeof(gFontDWR) - (dw==1?0:5)); - else - memcpy(line + x + 3, gFontHold, sizeof(gFontHold)); - } - else if(dw == 2) { // XB - crossband - memcpy(line + x + 2, gFontXB, sizeof(gFontXB)); + #ifdef ENABLE_FEAT_F4HWN_MENU_LOCK + if(gEeprom.MENU_LOCK == true) { + memcpy(line + x + 2, gFontRO, sizeof(gFontRO)); } else { - memcpy(line + x + 2, gFontMO, sizeof(gFontMO)); + #endif + uint8_t dw = (gEeprom.DUAL_WATCH != DUAL_WATCH_OFF) + (gEeprom.CROSS_BAND_RX_TX != CROSS_BAND_OFF) * 2; + if(dw == 1 || dw == 3) { // DWR - dual watch + respond + if(gDualWatchActive) + memcpy(line + x + (dw==1?0:2), gFontDWR, sizeof(gFontDWR) - (dw==1?0:5)); + else + memcpy(line + x + 3, gFontHold, sizeof(gFontHold)); + } + else if(dw == 2) { // XB - crossband + memcpy(line + x + 2, gFontXB, sizeof(gFontXB)); + } + else + { + memcpy(line + x + 2, gFontMO, sizeof(gFontMO)); + } + #ifdef ENABLE_FEAT_F4HWN_MENU_LOCK } + #endif } } x += sizeof(gFontDWR) + 3; @@ -213,11 +223,6 @@ 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));