diff --git a/wled00/fcn_declare.h b/wled00/fcn_declare.h index c1c5e445..6828ac8e 100644 --- a/wled00/fcn_declare.h +++ b/wled00/fcn_declare.h @@ -299,7 +299,7 @@ class UsermodManager { void onUpdateBegin(bool); bool add(Usermod* um); Usermod* lookup(uint16_t mod_id); - byte getModCount(); + byte getModCount() {return numMods;}; }; //usermods_list.cpp diff --git a/wled00/um_manager.cpp b/wled00/um_manager.cpp index b2b16945..5dfab412 100644 --- a/wled00/um_manager.cpp +++ b/wled00/um_manager.cpp @@ -59,5 +59,3 @@ bool UsermodManager::add(Usermod* um) ums[numMods++] = um; return true; } - -byte UsermodManager::getModCount() {return numMods;} \ No newline at end of file diff --git a/wled00/xml.cpp b/wled00/xml.cpp index dd8a24d4..17726632 100644 --- a/wled00/xml.cpp +++ b/wled00/xml.cpp @@ -308,9 +308,15 @@ void getSettingsJS(byte subPage, char* dest) // set limits 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(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(SET_F(");"));