Skip to content

Commit

Permalink
chore: remove unused PWM_BACKLIGHT define (#4945)
Browse files Browse the repository at this point in the history
Most of the code was removed between OTX 2.2 and 2.3
  • Loading branch information
philmoz authored Apr 30, 2024
1 parent dc2998e commit 4f0610c
Show file tree
Hide file tree
Showing 5 changed files with 2 additions and 31 deletions.
18 changes: 0 additions & 18 deletions radio/src/gui/128x64/radio_setup.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -86,8 +86,6 @@ enum {
CASE_BACKLIGHT(ITEM_RADIO_SETUP_BACKLIGHT_MODE)
CASE_BACKLIGHT(ITEM_RADIO_SETUP_BACKLIGHT_DELAY)
CASE_BACKLIGHT(ITEM_RADIO_SETUP_BRIGHTNESS)
CASE_PWM_BACKLIGHT(ITEM_RADIO_SETUP_BACKLIGHT_BRIGHTNESS_OFF)
CASE_PWM_BACKLIGHT(ITEM_RADIO_SETUP_BACKLIGHT_BRIGHTNESS_ON)
CASE_BACKLIGHT(ITEM_RADIO_SETUP_FLASH_BEEP)
CASE_CONTRAST(ITEM_RADIO_SETUP_CONTRAST)
CASE_SPLASH_PARAM(ITEM_RADIO_SETUP_DISABLE_SPLASH)
Expand Down Expand Up @@ -186,8 +184,6 @@ void menuRadioSetup(event_t event)
CASE_BACKLIGHT(0)
CASE_BACKLIGHT(0)
CASE_BACKLIGHT(0)
CASE_PWM_BACKLIGHT(0)
CASE_PWM_BACKLIGHT(0)
CASE_BACKLIGHT(0)
CASE_CONTRAST(0)
CASE_SPLASH_PARAM(0)
Expand Down Expand Up @@ -567,20 +563,6 @@ void menuRadioSetup(event_t event)
break;
#endif

#if defined(PWM_BACKLIGHT)
case ITEM_RADIO_SETUP_BACKLIGHT_BRIGHTNESS_OFF:
lcdDrawText(INDENT_WIDTH, y, STR_BLOFFBRIGHTNESS);
lcdDrawNumber(LCD_W-2, y, g_eeGeneral.blOffBright, attr|RIGHT);
if (attr) CHECK_INCDEC_GENVAR(event, g_eeGeneral.blOffBright, 0, 15);
break;

case ITEM_RADIO_SETUP_BACKLIGHT_BRIGHTNESS_ON:
lcdDrawText(INDENT_WIDTH, y, STR_BLONBRIGHTNESS);
lcdDrawNumber(LCD_W-2, y, 15-g_eeGeneral.blOnBright, attr|RIGHT);
if (attr) g_eeGeneral.blOnBright = 15 - checkIncDecGen(event, 15-g_eeGeneral.blOnBright, 0, 15);
break;
#endif

case ITEM_RADIO_SETUP_DISABLE_SPLASH:
{
lcdDrawTextAlignedLeft(y, STR_SPLASHSCREEN);
Expand Down
6 changes: 0 additions & 6 deletions radio/src/gui/common/stdlcd/features.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,12 +65,6 @@
#define CASE_AUDIO(x)
#endif

#if defined(PWM_BACKLIGHT)
#define CASE_PWM_BACKLIGHT(x) x,
#else
#define CASE_PWM_BACKLIGHT(x)
#endif

#if defined(GPS)
#define CASE_GPS(x) x,
#else
Expand Down
5 changes: 0 additions & 5 deletions radio/src/opentx.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -208,11 +208,6 @@ void per10ms()
telemetryInterrupt10ms();

// These moved here from evalFlightModeMixes() to improve beep trigger reliability.
#if defined(PWM_BACKLIGHT)
if ((g_tmr10ms&0x03) == 0x00)
backlightFade(); // increment or decrement brightness until target brightness is reached
#endif

#if !defined(AUDIO)
if (mixWarning & 1) if(((g_tmr10ms&0xFF)== 0)) AUDIO_MIX_WARNING(1);
if (mixWarning & 2) if(((g_tmr10ms&0xFF)== 64) || ((g_tmr10ms&0xFF)== 72)) AUDIO_MIX_WARNING(2);
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -834,7 +834,7 @@ const char STR_IMU_OFFSET[] = TR_IMU_OFFSET;
const char STR_IMU_MAX[] = TR_IMU_MAX;
#endif

#if defined(PWM_BACKLIGHT) || defined(COLORLCD)
#if defined(COLORLCD)
const char STR_BLONBRIGHTNESS[] = TR_BLONBRIGHTNESS;
const char STR_BLOFFBRIGHTNESS[] = TR_BLOFFBRIGHTNESS;
const char STR_KEYS_BACKLIGHT[] = TR_KEYS_BACKLIGHT;
Expand Down
2 changes: 1 addition & 1 deletion radio/src/translations.h
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ extern const char STR_GHOST_MENU_LABEL[];
extern const char STR_STATUS[];
extern const char STR_BLDELAY[];

#if defined(PWM_BACKLIGHT) || defined(COLORLCD)
#if defined(COLORLCD)
extern const char STR_BLONBRIGHTNESS[];
extern const char STR_BLOFFBRIGHTNESS[];
extern const char STR_KEYS_BACKLIGHT[];
Expand Down

0 comments on commit 4f0610c

Please sign in to comment.