Brightness adjust from backlight function (#7680)
Adjust brightness from backlight function
This commit is contained in:
+10
-3
@@ -340,7 +340,7 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
|
||||
|
||||
#if defined(VARIO)
|
||||
case FUNC_VARIO:
|
||||
newActiveFunctions |= (1 << FUNCTION_VARIO);
|
||||
newActiveFunctions |= (1u << FUNCTION_VARIO);
|
||||
break;
|
||||
#endif
|
||||
|
||||
@@ -348,15 +348,22 @@ void evalFunctions(const CustomFunctionData * functions, CustomFunctionsContext
|
||||
#if defined(SDCARD)
|
||||
case FUNC_LOGS:
|
||||
if (CFN_PARAM(cfn)) {
|
||||
newActiveFunctions |= (1 << FUNCTION_LOGS);
|
||||
newActiveFunctions |= (1u << FUNCTION_LOGS);
|
||||
logDelay = CFN_PARAM(cfn);
|
||||
}
|
||||
break;
|
||||
#endif
|
||||
|
||||
case FUNC_BACKLIGHT:
|
||||
newActiveFunctions |= (1 << FUNCTION_BACKLIGHT);
|
||||
{
|
||||
getvalue_t raw = getValue(CFN_PARAM(cfn));
|
||||
#if defined(COLORLCD)
|
||||
requiredBacklightBright = (1024 - raw) * (BACKLIGHT_LEVEL_MAX - BACKLIGHT_LEVEL_MIN) / 2048;
|
||||
#else
|
||||
requiredBacklightBright = (1024 - raw) * 100 / 2048;
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
||||
case FUNC_SCREENSHOT:
|
||||
if (!(functionsContext.activeSwitches & switch_mask)) {
|
||||
|
||||
Reference in New Issue
Block a user