chore: use settings from radio JSON files instead of hal.h (#7411)

Co-authored-by: 3djc <3djc@gh.com>
This commit is contained in:
philmoz
2026-07-13 10:15:50 +10:00
committed by GitHub
co-authored by 3djc
parent 445c09f662
commit f3cabd42f7
100 changed files with 3290 additions and 2193 deletions
+5 -5
View File
@@ -181,7 +181,7 @@ void pwrResetHandler();
#define pwrForcePressed() false
// Backlight driver
#if defined(OLED_SCREEN)
#if OLED_SCREEN
#define BACKLIGHT_DISABLE() lcdSetRefVolt(0)
#define BACKLIGHT_FORCED_ON 255
#else
@@ -199,7 +199,7 @@ bool isBacklightEnabled();
void backlightEnable(uint8_t level, uint8_t color);
#define BACKLIGHT_ENABLE() \
backlightEnable(currentBacklightBright, g_eeGeneral.backlightColor)
#elif defined(OLED_SCREEN)
#elif OLED_SCREEN
#define BACKLIGHT_ENABLE() lcdSetRefVolt(currentBacklightBright)
#else
void backlightEnable(uint8_t level);
@@ -255,7 +255,7 @@ void ledBlue();
#define LCD_CONTRAST_DEFAULT 25
#else
#define IS_LCD_RESET_NEEDED() true
#if defined(OLED_SCREEN)
#if OLED_SCREEN
#define LCD_CONTRAST_MIN 2
#define LCD_CONTRAST_MAX 254
#else
@@ -269,7 +269,7 @@ void ledBlue();
#define LCD_BRIGHTNESS_DEFAULT 30
#endif
#if defined(OLED_SCREEN)
#if OLED_SCREEN
#define LCD_CONTRAST_DEFAULT 254 // full brightness
#elif defined(RADIO_TX12) || defined(RADIO_TX12MK2) || defined(RADIO_BOXER) || defined(RADIO_MT12)
#define LCD_CONTRAST_DEFAULT 20
@@ -278,7 +278,7 @@ void ledBlue();
#else
#define LCD_CONTRAST_DEFAULT 15
#endif
#if defined(OLED_SCREEN)
#if OLED_SCREEN
// add offset 2px because driver (SH1106) of the 1.3 OLED is for a 132 display
#define LCD_W_OFFSET 0x02
#endif