feat: simple global control for backlight/brightness and volume (#6684)
This commit is contained in:
+18
-6
@@ -1194,12 +1194,6 @@ void evalMixes(uint8_t tick10ms)
|
||||
// must be done after mixing because some functions use the inputs/channels values
|
||||
// must be done before limits because of the applyLimit function: it checks for safety switches which would be not initialized otherwise
|
||||
if (tick10ms) {
|
||||
#if defined(AUDIO)
|
||||
requiredSpeakerVolume = g_eeGeneral.speakerVolume + VOLUME_LEVEL_DEF;
|
||||
#endif
|
||||
|
||||
requiredBacklightBright = g_eeGeneral.getBrightness();
|
||||
|
||||
if (radioGFEnabled()) {
|
||||
evalFunctions(g_eeGeneral.customFn, globalFunctionsContext);
|
||||
} else {
|
||||
@@ -1217,6 +1211,24 @@ void evalMixes(uint8_t tick10ms)
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#if defined(AUDIO)
|
||||
if (!isFunctionActive(FUNCTION_VOLUME)) {
|
||||
if (g_eeGeneral.volumeSrc) {
|
||||
calcVolumeValue(g_eeGeneral.volumeSrc);
|
||||
} else {
|
||||
requiredSpeakerVolume = g_eeGeneral.speakerVolume + VOLUME_LEVEL_DEF;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!isFunctionActive(FUNCTION_BACKLIGHT)) {
|
||||
if (g_eeGeneral.backlightSrc) {
|
||||
calcBacklightValue(g_eeGeneral.backlightSrc);
|
||||
} else {
|
||||
requiredBacklightBright = g_eeGeneral.getBrightness();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//========== LIMITS ===============
|
||||
|
||||
Reference in New Issue
Block a user