diff --git a/Makefile b/Makefile index 5c1cb27..28cb05b 100644 --- a/Makefile +++ b/Makefile @@ -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 diff --git a/app/menu.c b/app/menu.c index f5edf32..b8cbd6a 100644 --- a/app/menu.c +++ b/app/menu.c @@ -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; diff --git a/compile-with-docker-all.sh b/compile-with-docker-all.sh index 0dcba60..4c7160a 100755 --- a/compile-with-docker-all.sh +++ b/compile-with-docker-all.sh @@ -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/" } diff --git a/ui/menu.c b/ui/menu.c index 7a4d2d2..704f30b 100644 --- a/ui/menu.c +++ b/ui/menu.c @@ -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]);