fix(fw): compilation without AUDIO (#5022)

This commit is contained in:
Raphael Coeffic
2024-05-18 14:11:20 +10:00
committed by GitHub
parent c2e7d91539
commit 6a59c580ef
14 changed files with 75 additions and 10 deletions
+5
View File
@@ -43,8 +43,11 @@
#include "lua/lua_event.h"
#endif
#if defined(AUDIO)
uint8_t currentSpeakerVolume = 255;
uint8_t requiredSpeakerVolume = 255;
#endif
uint8_t currentBacklightBright = 0;
uint8_t requiredBacklightBright = 0;
uint8_t mainRequestFlags = 0;
@@ -265,12 +268,14 @@ void handleJackConnection()
void checkSpeakerVolume()
{
#if defined(AUDIO)
if (currentSpeakerVolume != requiredSpeakerVolume) {
currentSpeakerVolume = requiredSpeakerVolume;
#if !defined(SOFTWARE_VOLUME)
setScaledVolume(currentSpeakerVolume);
#endif
}
#endif
}
#if defined(USE_HATS_AS_KEYS)