feat: improved OLED brightness handling (#3773)

This commit is contained in:
3djc
2023-08-12 11:17:50 +02:00
committed by GitHub
parent f1968f9857
commit 3342d21195
7 changed files with 37 additions and 8 deletions
+2
View File
@@ -399,6 +399,8 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
requiredBacklightBright =
(1024 - raw) * (BACKLIGHT_LEVEL_MAX - BACKLIGHT_LEVEL_MIN) /
2048;
#elif defined(OLED_SCREEN)
requiredBacklightBright = (raw + 1024) * 254 / 2048;
#else
requiredBacklightBright = (1024 - raw) * 100 / 2048;
#endif