Add ENABLE_FEAT_F4HWN_CONTRAST

This commit is contained in:
Armel FAUVEAU
2024-11-10 18:44:01 +01:00
parent 1334499a16
commit ffc5106105
4 changed files with 15 additions and 0 deletions

View File

@@ -48,6 +48,7 @@ ENABLE_FEAT_F4HWN_CHARGING_C ?= 1
ENABLE_FEAT_F4HWN_SLEEP ?= 1
ENABLE_FEAT_F4HWN_RESTORE_SCAN ?= 1
ENABLE_FEAT_F4HWN_NARROWER ?= 1
ENABLE_FEAT_F4HWN_CONTRAST ?= 1
ENABLE_FEAT_F4HWN_VOL ?= 0
ENABLE_FEAT_F4HWN_RESET_CHANNEL ?= 0
ENABLE_FEAT_F4HWN_PMR ?= 0
@@ -435,6 +436,9 @@ endif
ifeq ($(ENABLE_FEAT_F4HWN_NARROWER),1)
CFLAGS += -DENABLE_FEAT_F4HWN_NARROWER
endif
ifeq ($(ENABLE_FEAT_F4HWN_CONTRAST),1)
CFLAGS += -DENABLE_FEAT_F4HWN_CONTRAST
endif
ifeq ($(ENABLE_FEAT_F4HWN_VOL),1)
CFLAGS += -DENABLE_FEAT_F4HWN_VOL
endif

View File

@@ -400,10 +400,12 @@ int MENU_GetLimits(uint8_t menu_id, int32_t *pMin, int32_t *pMax)
//*pMin = 0;
*pMax = ARRAY_SIZE(gSubMenu_SET_TOT) - 1;
break;
#ifdef ENABLE_FEAT_F4HWN_CONTRAST
case MENU_SET_CTR:
*pMin = 1;
*pMax = 15;
break;
#endif
case MENU_TX_LOCK:
case MENU_SET_INV:
//*pMin = 0;
@@ -914,9 +916,11 @@ void MENU_AcceptSetting(void)
case MENU_SET_EOT:
gSetting_set_eot = gSubMenuSelection;
break;
#ifdef ENABLE_FEAT_F4HWN_CONTRAST
case MENU_SET_CTR:
gSetting_set_ctr = gSubMenuSelection;
break;
#endif
case MENU_SET_INV:
gSetting_set_inv = gSubMenuSelection;
break;
@@ -1360,9 +1364,11 @@ void MENU_ShowCurrentSetting(void)
case MENU_SET_EOT:
gSubMenuSelection = gSetting_set_eot;
break;
#ifdef ENABLE_FEAT_F4HWN_CONTRAST
case MENU_SET_CTR:
gSubMenuSelection = gSetting_set_ctr;
break;
#endif
case MENU_SET_INV:
gSubMenuSelection = gSetting_set_inv;
break;

View File

@@ -39,6 +39,7 @@ voxless() {
ENABLE_FEAT_F4HWN_RESTORE_SCAN=0 \
ENABLE_FEAT_F4HWN_CHARGING_C=0 \
ENABLE_FEAT_F4HWN_NARROWER=0 \
ENABLE_FEAT_F4HWN_CONTRAST=0 \
TARGET=f4hwn.voxless \
&& cp f4hwn.voxless* compiled-firmware/"
}

View File

@@ -141,7 +141,9 @@ const t_menu_item MenuList[] =
{"SetPTT", MENU_SET_PTT },
{"SetTOT", MENU_SET_TOT },
{"SetEOT", MENU_SET_EOT },
#ifdef ENABLE_FEAT_F4HWN_CONTRAST
{"SetCtr", MENU_SET_CTR },
#endif
{"SetInv", MENU_SET_INV },
{"SetLck", MENU_SET_LCK },
{"SetMet", MENU_SET_MET },
@@ -1013,11 +1015,13 @@ void UI_DisplayMenu(void)
strcpy(String, gSubMenu_SET_TOT[gSubMenuSelection]); // Same as SET_TOT
break;
#ifdef ENABLE_FEAT_F4HWN_CONTRAST
case MENU_SET_CTR:
sprintf(String, "%d", gSubMenuSelection);
gSetting_set_ctr = gSubMenuSelection;
ST7565_ContrastAndInv();
break;
#endif
case MENU_SET_INV:
strcpy(String, gSubMenu_OFF_ON[gSubMenuSelection]);