2.4 continued (#8092)
Quite a bit of work on 2.4 Co-authored-by: 3djc <Th1sisfmyofmyo>
This commit is contained in:
co-authored by
3djc <Th1sisfmyofmyo>
parent
cd6aa7af00
commit
87cd9047b1
+10
-1
@@ -359,9 +359,18 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
|
||||
|
||||
case FUNC_BACKLIGHT:
|
||||
{
|
||||
newActiveFunctions |= (1u << FUNCTION_BACKLIGHT);
|
||||
if (!CFN_PARAM(cfn)) { // When no source is set, backlight works like original backlight and turn on regardless of backlight settings
|
||||
requiredBacklightBright = BACKLIGHT_FORCED_ON;
|
||||
break;
|
||||
}
|
||||
|
||||
getvalue_t raw = getValue(CFN_PARAM(cfn));
|
||||
#if defined(COLORLCD)
|
||||
requiredBacklightBright = (1024 - raw) * (BACKLIGHT_LEVEL_MAX - BACKLIGHT_LEVEL_MIN) / 2048;
|
||||
if (raw == -1024)
|
||||
requiredBacklightBright = 100;
|
||||
else
|
||||
requiredBacklightBright = (1024 - raw) * (BACKLIGHT_LEVEL_MAX - BACKLIGHT_LEVEL_MIN) / 2048;
|
||||
#else
|
||||
requiredBacklightBright = (1024 - raw) * 100 / 2048;
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user