feat: simple global control for backlight/brightness and volume (#6684)

This commit is contained in:
philmoz
2026-01-04 17:56:50 +10:00
committed by GitHub
parent 586a567b0b
commit e80406b274
71 changed files with 812 additions and 374 deletions
+18 -6
View File
@@ -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 ===============