diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index 88f1e1b6..c10a2201 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -1802,7 +1802,10 @@ void WS2812FX::finalizeInit(void) for (uint8_t i=0; igetStart() + bus->getLength() > MAX_LEDS) break; + if (bus->getStart() + bus->getLength() > MAX_LEDS) { + USER_PRINT("\nError: too many LEDs, max number is "); USER_PRINTLN(MAX_LEDS); + break; + } //RGBW mode is enabled if at least one of the strips is RGBW _hasWhiteChannel |= bus->hasWhite(); //refresh is required to remain off if at least one of the strips requires the refresh. diff --git a/wled00/bus_manager.h b/wled00/bus_manager.h index 350a5f3f..9259bd1f 100644 --- a/wled00/bus_manager.h +++ b/wled00/bus_manager.h @@ -68,7 +68,7 @@ struct BusConfig { for (uint8_t i = 0; i < min(unsigned(nPins), sizeof(pins)/sizeof(pins[0])); i++) pins[i] = ppins[i]; //softhack007 fix for potential array out-of-bounds access } - //validates start and length and extends total if needed + //validates start and length and extends total if needed // WLEDMM this function is not used anywhere bool adjustBounds(uint16_t& total) { if (!count) count = 1; if (count > MAX_LEDS_PER_BUS) count = MAX_LEDS_PER_BUS; diff --git a/wled00/const.h b/wled00/const.h index 26f31ca1..62fbfb62 100644 --- a/wled00/const.h +++ b/wled00/const.h @@ -395,7 +395,11 @@ #define MAX_LEDS 1664 //can't rely on memory limit to limit this to 1600 LEDs #else //#define MAX_LEDS 8192 -#define MAX_LEDS 8464 // WLEDMM 92x92 +#if !defined(CONFIG_IDF_TARGET_ESP32S3) + #define MAX_LEDS 8464 // WLEDMM 92x92 for esp32, esp32-S2 and esp32-c3 +#else + #define MAX_LEDS 18436 // WLEDMM 128x128 + 2048 + 4 for esp32-S3 +#endif #endif #endif diff --git a/wled00/data/settings_leds.htm b/wled00/data/settings_leds.htm index 9aec8d78..35d32321 100644 --- a/wled00/data/settings_leds.htm +++ b/wled00/data/settings_leds.htm @@ -5,7 +5,7 @@ LED Settings