diff --git a/wled00/FX_2Dfcn.cpp b/wled00/FX_2Dfcn.cpp index 98a8f184..f1003e45 100644 --- a/wled00/FX_2Dfcn.cpp +++ b/wled00/FX_2Dfcn.cpp @@ -567,8 +567,6 @@ bool Segment::jsonToPixels(char * name, uint8_t fileNr) { if (!requestJSONBufferLock(23)) return false; - USER_PRINTF("file %s %d", fileName, isFile); - if (!readObjectFromFile(fileName, nullptr, &doc)) { releaseJSONBufferLock(); return false; //if file does not exist just exit @@ -576,12 +574,9 @@ bool Segment::jsonToPixels(char * name, uint8_t fileNr) { JsonArray map = doc[F("seg")][F("i")]; - // serializeJson(map, Serial); - if (!map.isNull() && map.size()) { // not an empty map for (uint16_t i=0; i().c_str(), map[i+1].as().c_str(), map[i+2].as().c_str()); CRGB color = CRGB(map[i+2][0], map[i+2][1], map[i+2][2]); for (uint16_t j=map[i]; j<=map[i+1]; j++) { setPixelColor(j, color); diff --git a/wled00/wled.h b/wled00/wled.h index 3b4fc24b..92f3a9f5 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2304050 +#define VERSION 2304060 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG diff --git a/wled00/ws.cpp b/wled00/ws.cpp index 934cd775..efa9601d 100644 --- a/wled00/ws.cpp +++ b/wled00/ws.cpp @@ -162,12 +162,12 @@ bool sendLiveLedsWs(uint32_t wsClient) #ifdef ESP8266 const size_t MAX_LIVE_LEDS_WS = 256U; #else - const size_t MAX_LIVE_LEDS_WS = 1024U; //WLEDMM use 4096 as max matrix size + const size_t MAX_LIVE_LEDS_WS = 4096U; //WLEDMM use 4096 as max matrix size #endif size_t n = ((used -1)/MAX_LIVE_LEDS_WS) +1; //only serve every n'th LED if count over MAX_LIVE_LEDS_WS size_t pos = (strip.isMatrix ? 4 : 2); size_t bufSize = pos + (used/n)*3; - size_t skipLines = 0; + //WLEDMM: no skipLines AsyncWebSocketMessageBuffer * wsBuf = ws.makeBuffer(bufSize); if (!wsBuf) return false; //out of memory @@ -179,25 +179,13 @@ bool sendLiveLedsWs(uint32_t wsClient) buffer[1] = 2; //version buffer[2] = Segment::maxWidth; buffer[3] = Segment::maxHeight; - if (Segment::maxWidth * Segment::maxHeight > MAX_LIVE_LEDS_WS*4) { - buffer[2] = Segment::maxWidth/4; - buffer[3] = Segment::maxHeight/4; - skipLines = 3; - } else if (Segment::maxWidth * Segment::maxHeight > MAX_LIVE_LEDS_WS) { - buffer[2] = Segment::maxWidth/2; - buffer[3] = Segment::maxHeight/2; - skipLines = 1; - } + //WLEDMM: no skipLines } #endif for (size_t i = 0; pos < bufSize -2; i += n) { -#ifndef WLED_DISABLE_2D - if (strip.isMatrix && skipLines) { - if ((i/Segment::maxWidth)%(skipLines+1)) i += Segment::maxWidth * skipLines; - } -#endif + //WLEDMM: no skipLines uint32_t c = strip.getPixelColor(i); buffer[pos++] = qadd8(W(c), R(c)); //R, add white channel to RGB channels as a simple RGBW -> RGB map buffer[pos++] = qadd8(W(c), G(c)); //G