Prevent I2S use for LEDs w/ Audioreactive on ESP32
This commit is contained in:
parent
1f3a1a0a95
commit
35250677b9
@ -299,7 +299,7 @@ class UsermodManager {
|
|||||||
void onUpdateBegin(bool);
|
void onUpdateBegin(bool);
|
||||||
bool add(Usermod* um);
|
bool add(Usermod* um);
|
||||||
Usermod* lookup(uint16_t mod_id);
|
Usermod* lookup(uint16_t mod_id);
|
||||||
byte getModCount();
|
byte getModCount() {return numMods;};
|
||||||
};
|
};
|
||||||
|
|
||||||
//usermods_list.cpp
|
//usermods_list.cpp
|
||||||
|
@ -59,5 +59,3 @@ bool UsermodManager::add(Usermod* um)
|
|||||||
ums[numMods++] = um;
|
ums[numMods++] = um;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
byte UsermodManager::getModCount() {return numMods;}
|
|
@ -308,9 +308,15 @@ void getSettingsJS(byte subPage, char* dest)
|
|||||||
|
|
||||||
// set limits
|
// set limits
|
||||||
oappend(SET_F("bLimits("));
|
oappend(SET_F("bLimits("));
|
||||||
|
#ifdef ESP32
|
||||||
|
// requested by @softhack007 https://github.com/blazoncek/WLED/issues/33
|
||||||
|
if (usermods.lookup(USERMOD_ID_AUDIOREACTIVE))
|
||||||
|
oappend(itoa(WLED_MAX_BUSSES-2,nS,10)); // prevent use of I2S buses if audio installed
|
||||||
|
else
|
||||||
|
#endif
|
||||||
oappend(itoa(WLED_MAX_BUSSES,nS,10)); oappend(",");
|
oappend(itoa(WLED_MAX_BUSSES,nS,10)); oappend(",");
|
||||||
oappend(itoa(MAX_LEDS_PER_BUS,nS,10)); oappend(",");
|
oappend(itoa(MAX_LEDS_PER_BUS,nS,10)); oappend(",");
|
||||||
oappend(itoa(MAX_LED_MEMORY,nS,10)); oappend(",");
|
oappend(itoa(MAX_LED_MEMORY,nS,10)); oappend(",");
|
||||||
oappend(itoa(MAX_LEDS,nS,10));
|
oappend(itoa(MAX_LEDS,nS,10));
|
||||||
oappend(SET_F(");"));
|
oappend(SET_F(");"));
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user