diff --git a/wled00/FX.h b/wled00/FX.h index 87b9b7da..b42dd099 100644 --- a/wled00/FX.h +++ b/wled00/FX.h @@ -665,12 +665,8 @@ class WS2812FX { // 96 bytes timebase(0), isMatrix(false), #ifndef WLED_DISABLE_2D - hPanels(1), - vPanels(1), - panelH(8), - panelW(8), + panels(1), matrix{0,0,0,0}, - panel{{0,0,0,0}}, #endif // semi-private (just obscured) used in effect functions through macros _currentPalette(CRGBPalette16(CRGB::Black)), @@ -707,6 +703,7 @@ class WS2812FX { // 96 bytes _mode.clear(); _modeData.clear(); _segments.clear(); + panel.clear(); customPalettes.clear(); if (useLedsArray && Segment::_globalLeds) free(Segment::_globalLeds); } @@ -819,22 +816,31 @@ class WS2812FX { // 96 bytes #ifndef WLED_DISABLE_2D #define WLED_MAX_PANELS 64 uint8_t - hPanels, - vPanels; + panels; - uint16_t - panelH, - panelW; + struct { + bool bottomStart : 1; + bool rightStart : 1; + bool vertical : 1; + bool serpentine : 1; + } matrix; - typedef struct panel_bitfield_t { - bool bottomStart : 1; // starts at bottom? - bool rightStart : 1; // starts on right? - bool vertical : 1; // is vertical? - bool serpentine : 1; // is serpentine? + typedef struct panel_t { + uint16_t xOffset; // x offset relative to the top left of matrix in LEDs + uint16_t yOffset; // y offset relative to the top left of matrix in LEDs + uint8_t width; // width of the panel + uint8_t height; // height of the panel + union { + uint8_t options; + struct { + bool bottomStart : 1; // starts at bottom? + bool rightStart : 1; // starts on right? + bool vertical : 1; // is vertical? + bool serpentine : 1; // is serpentine? + }; + }; } Panel; - Panel - matrix, - panel[WLED_MAX_PANELS]; + std::vector panel; #endif void diff --git a/wled00/FX_2Dfcn.cpp b/wled00/FX_2Dfcn.cpp index 992065ad..985a53a1 100644 --- a/wled00/FX_2Dfcn.cpp +++ b/wled00/FX_2Dfcn.cpp @@ -43,63 +43,64 @@ void WS2812FX::setUpMatrix(bool reset) { customMappingSize = 0; } - // important if called from set.cpp, irrelevant if called from cfg.cpp - // fix limits if not a matrix set-up (no finalizeInit() called from set.cpp) - Segment::maxWidth = _length; - Segment::maxHeight = 1; - // isMatrix is set in cfg.cpp or set.cpp if (isMatrix) { - uint16_t maxWidth = hPanels * panelW; - uint16_t maxHeight = vPanels * panelH; + // calculate width dynamically because it will have gaps + Segment::maxWidth = 1; + Segment::maxHeight = 1; + for (size_t i = 0; i < panel.size(); i++) { + Panel &p = panel[i]; + if (p.xOffset + p.width > Segment::maxWidth) { + Segment::maxWidth = p.xOffset + p.width; + } + if (p.yOffset + p.height > Segment::maxHeight) { + Segment::maxHeight = p.yOffset + p.height; + } + } // safety check - if (maxWidth * maxHeight > MAX_LEDS || maxWidth == 1 || maxHeight == 1) { + if (Segment::maxWidth * Segment::maxHeight > MAX_LEDS || Segment::maxWidth <= 1 || Segment::maxHeight <= 1) { + DEBUG_PRINTLN(F("2D Bounds error.")); isMatrix = false; + Segment::maxWidth = _length; + Segment::maxHeight = 1; + panels = 0; + panel.clear(); // release memory allocated by panels return; } if (reset) { //WLEDMM: add reset option to switch on/off reset of customMappingTable - customMappingTable = new uint16_t[maxWidth * maxHeight]; + customMappingTable = new uint16_t[Segment::maxWidth * Segment::maxHeight]; //WLEDMM: init customMappingTable with a 1:1 mapping (for customMappingTable[customMappingTable[x]]) - for (uint16_t i=0; i= customMappingSize) return; // customMappingSize is always W * H of matrix in 2D setup + if (index >= customMappingSize) return; #else uint16_t index = x; if (index >= _length) return; diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index 9acf375a..a92fdff3 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -100,32 +100,38 @@ bool deserializeConfig(JsonObject doc, bool fromFS) { JsonObject matrix = hw_led[F("matrix")]; if (!matrix.isNull()) { strip.isMatrix = true; - CJSON(strip.panelH, matrix[F("ph")]); - CJSON(strip.panelW, matrix[F("pw")]); - CJSON(strip.hPanels, matrix[F("mph")]); - CJSON(strip.vPanels, matrix[F("mpv")]); + CJSON(strip.panels, matrix[F("mpc")]); CJSON(strip.matrix.bottomStart, matrix[F("pb")]); CJSON(strip.matrix.rightStart, matrix[F("pr")]); CJSON(strip.matrix.vertical, matrix[F("pv")]); CJSON(strip.matrix.serpentine, matrix["ps"]); + strip.panel.clear(); JsonArray panels = matrix[F("panels")]; uint8_t s = 0; if (!panels.isNull()) { + strip.panel.reserve(max(1U,min((size_t)strip.panels,(size_t)WLED_MAX_PANELS))); // pre-allocate memory for panels for (JsonObject pnl : panels) { - CJSON(strip.panel[s].bottomStart, pnl["b"]); - CJSON(strip.panel[s].rightStart, pnl["r"]); - CJSON(strip.panel[s].vertical, pnl["v"]); - CJSON(strip.panel[s].serpentine, pnl["s"]); - if (++s >= WLED_MAX_PANELS) break; // max panels reached + WS2812FX::Panel p; + CJSON(p.bottomStart, pnl["b"]); + CJSON(p.rightStart, pnl["r"]); + CJSON(p.vertical, pnl["v"]); + CJSON(p.serpentine, pnl["s"]); + CJSON(p.xOffset, pnl["x"]); + CJSON(p.yOffset, pnl["y"]); + CJSON(p.height, pnl["h"]); + CJSON(p.width, pnl["w"]); + strip.panel.push_back(p); + if (++s >= WLED_MAX_PANELS || s >= strip.panels) break; // max panels reached } - } - // clear remaining panels - for (; s var d=document; var loc = false, locip; + var maxPanels=64; function H(){window.open("https://mm.kno.wled.ge/features/2D");} function B(){window.open("/settings","_self");} function gId(n){return d.getElementById(n);} @@ -43,34 +44,31 @@ loadJS(url, false); // If we set async false, file is loaded and executed, then next statement is processed } - var maxPanels=64; - function UI(change=false) + function UI(panels=1) { + gId("mpdiv").style.display = "block"; + if (gId("somp").value === "0") { gId("mpdiv").style.display = "none"; resetPanels(); return; } - gId("mpdiv").style.display = "block"; - maxPanels = parseInt(d.Sf.MPH.value) * parseInt(d.Sf.MPV.value); - let i = gId("panels").children.length; - if (imaxPanels) for (let j=i; j>maxPanels; j--) remPanel(); - //btnPanel(gId("panels").children.length); + if (ipanels) for (let j=i; j>panels; j--) remPanel(); } function addPanels() { - let h = parseInt(d.Sf.MPH.value); - let v = parseInt(d.Sf.MPV.value); - for (let i=0; i= maxPanels) return; - let b = `
${i===0?"":'
'}Panel ${i}
1st LED:
-Serpentine:
`; +Serpentine:
+Dimensions (WxH): x
+Offset X: +Y:
(offset from top-left corner in # LEDs) +`; p.insertAdjacentHTML("beforeend", b); } @@ -93,15 +95,48 @@ Serpentine: `; } function resetPanels() { - d.Sf.MPH.value = 1; - d.Sf.MPV.value = 1; + d.Sf.MPC.value = 1; for (let e of gId("panels").children) e.remove(); + for (let e of gId("panels").children) e.remove(); // to remove any leftovers } function btnPanel(i) { gId("pnl_add").style.display = (i1) ? "inline":"none"; } + + function gen() { + resetPanels(); + + var pansH = parseInt(d.Sf.MPH.value); + var pansV = parseInt(d.Sf.MPV.value); + var c = pansH*pansV; + //maxPanels = c; + d.Sf.MPC.value = c; // number of panels + + var ps = d.Sf.PS.checked; + var pv = d.Sf.PV.value==="1"; + var pb = d.Sf.PB.value==="1"; + var pr = d.Sf.PR.value==="1"; + var pw = parseInt(d.Sf.PW.value); + var ph = parseInt(d.Sf.PH.value); + + var h = pv ? pansV : pansH; + var v = pv ? pansH : pansV; + for (let j = 0, p = 0; j < v; j++) { + for (let i = 0; i < h; i++, p++) { + if (j*i < maxPanels) addPanel(p); + var y = (pv?pr:pb) ? v-j-1: j; + var x = (pv?pb:pr) ? h-i-1 : i; + x = ps && j%2 ? h-x-1 : x; + gId("P"+p+"X").value = (pv?y:x) * pw; + gId("P"+p+"Y").value = (pv?x:y) * ph + gId("P"+p+"W").value = pw; + gId("P"+p+"H").value = ph; + } + } + } + @@ -118,7 +153,8 @@ Serpentine: `;
`;
- Serpentine: -
- A matrix is made of 1 or more physical LED panels of the same dimensions.
- Panels should be arranged from top-left to bottom-right order, starting with lower panel number on the left (or top if transposed).
- Each panel can have different LED orientation and/or starting point and/or layout.

+ Serpentine:
+ Can populate LED panel layout with pre-arranged matrix.
These values do not affect final layout.

+
+

Panel set-up

+ Number of panels:
+ A matrix is made of 1 or more physical LED panels.
+ + Each panel can be of different size and/or have different LED orientation and/or starting point and/or layout.

LED panel layout

diff --git a/wled00/html_settings.h b/wled00/html_settings.h index 964a7dc5..e97b2a0c 100644 --- a/wled00/html_settings.h +++ b/wled00/html_settings.h @@ -1872,118 +1872,137 @@ const uint8_t PAGE_settings_um[] PROGMEM = { // Autogenerated from wled00/data/settings_2D.htm, do not edit!! -const uint16_t PAGE_settings_2D_length = 1747; +const uint16_t PAGE_settings_2D_length = 2056; const uint8_t PAGE_settings_2D[] PROGMEM = { - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0x13, 0x95, 0x58, 0x5b, 0x6f, 0xdb, 0x36, - 0x14, 0x7e, 0xd7, 0xaf, 0x60, 0x88, 0xa2, 0x93, 0x5a, 0x59, 0x8e, 0xbb, 0x0b, 0x8a, 0x58, 0x52, - 0xd6, 0x34, 0xd9, 0x92, 0x21, 0x41, 0x83, 0xba, 0x4b, 0x31, 0xac, 0x43, 0x4b, 0x4b, 0xc7, 0x16, - 0x1b, 0x89, 0x14, 0x48, 0xca, 0x49, 0xe6, 0xe6, 0xbf, 0xef, 0x90, 0x92, 0xaf, 0x71, 0xda, 0xee, - 0x25, 0x36, 0xc9, 0x73, 0x3f, 0xdf, 0xb9, 0x38, 0xf1, 0xde, 0xf1, 0x9b, 0xd7, 0xef, 0xfe, 0xba, - 0x3c, 0x21, 0x85, 0xa9, 0xca, 0x34, 0xb6, 0x7f, 0x49, 0xc9, 0xc4, 0x34, 0xa1, 0x20, 0x28, 0x9e, - 0x81, 0xe5, 0x69, 0x5c, 0x81, 0x61, 0x24, 0x2b, 0x98, 0xd2, 0x60, 0x12, 0xda, 0x98, 0x49, 0xef, - 0x25, 0xed, 0x6e, 0x3d, 0xc1, 0x2a, 0x48, 0xe8, 0x8c, 0xc3, 0x4d, 0x2d, 0x95, 0xa1, 0x24, 0x93, - 0xc2, 0x80, 0x40, 0xb2, 0x1b, 0x9e, 0x9b, 0x22, 0xf9, 0x79, 0x7f, 0x7f, 0x49, 0x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f2, 0x28, 0x53, 0x68, 0x07, 0x74, 0x4c, 0x3e, 0x6d, 0x5d, 0xa5, 0xc1, - 0xd0, 0x44, 0xa8, 0xf7, 0x95, 0x31, 0x8a, 0x8f, 0x1b, 0x03, 0xf8, 0xa0, 0x32, 0x1a, 0x42, 0x10, - 0x6e, 0xdf, 0x9b, 0xbb, 0x1a, 0xd0, 0x32, 0x03, 0xb7, 0xa6, 0xff, 0x99, 0xcd, 0xd8, 0x42, 0xc0, - 0x03, 0x42, 0xa6, 0xef, 0x04, 0x8a, 0x10, 0x41, 0x98, 0x47, 0x63, 0x99, 0xdf, 0x45, 0xac, 0x46, - 0xff, 0xf2, 0xd7, 0x05, 0x2f, 0x73, 0xdf, 0x58, 0x7a, 0x96, 0xe7, 0x27, 0x33, 0xb4, 0xe2, 0x9c, - 0x6b, 0x4c, 0x33, 0x28, 0x9f, 0x5a, 0x9b, 0x69, 0xe8, 0x07, 0x49, 0x3a, 0xff, 0x1d, 0xcc, 0x95, - 0x1f, 0x84, 0x7f, 0x9e, 0xf9, 0xc1, 0xfd, 0x6e, 0x62, 0x50, 0x4a, 0x2a, 0xb4, 0x11, 0x89, 0x11, - 0x28, 0x5a, 0x96, 0x10, 0x95, 0x72, 0xea, 0xd3, 0x13, 0x7b, 0x4f, 0xba, 0x08, 0x60, 0x20, 0xc9, - 0x84, 0x97, 0xe0, 0x7c, 0x41, 0x64, 0x28, 0xf4, 0xf9, 0xbc, 0xbb, 0x97, 0x13, 0x0b, 0xbe, 0x09, - 0x9f, 0x36, 0x8a, 0xb9, 0x90, 0xb5, 0xbe, 0x90, 0x09, 0xe3, 0x36, 0x67, 0x1f, 0xc4, 0x99, 0xc8, - 0x64, 0x55, 0x63, 0xe4, 0x80, 0xd4, 0x6c, 0x0a, 0x24, 0x67, 0x86, 0xed, 0x61, 0x3a, 0xd6, 0xa2, - 0x3c, 0xc2, 0xf4, 0x51, 0xab, 0xe0, 0x80, 0x26, 0x49, 0x97, 0x47, 0x44, 0x88,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6, 0xe1, 0xa7, 0x0c, 0x8b, 0xbc, + 0x36, 0x59, 0x91, 0x44, 0x12, 0x21, 0x35, 0x61, 0x69, 0x6a, 0xee, 0x9f, 0x72, 0xc1, 0xe6, 0x28, + 0xbe, 0x61, 0x44, 0xd6, 0x84, 0x57, 0xba, 0x97, 0x9d, 0xd1, 0xf8, 0xee, 0x68, 0xcc, 0x59, 0x6e, + 0x50, 0x1b, 0x05, 0x5b, 0x97, 0xa6, 0x6a, 0xfe, 0x39, 0x63, 0x8a, 0xf5, 0x9f, 0x36, 0x1d, 0x0d, + 0x2b, 0x79, 0x26, 0x71, 0x0f, 0x5f, 0x2c, 0x8a, 0x77, 0xbf, 0x3c, 0x5b, 0x15, 0xed, 0x88, 0xd5, + 0x19, 0x57, 0xcd, 0x7c, 0x75, 0x5b, 0x5a, 0xd8, 0x79, 0xdf, 0x38, 0x85, 0x70, 0x85, 0x7f, 0x25, + 0x96, 0x18, 0x0d, 0x4c, 0xcf, 0x2c, 0x90, 0xe3, 0x91, 0x32, 0x7b, 0x50, 0xb6, 0x9c, 0x5a, 0xe7, + 0xaa, 0xda, 0x7b, 0xc7, 0x2c, 0xce, 0x1a, 0x6f, 0xc7, 0x18, 0x84, 0xa9, 0xd5, 0x4b, 0x38, 0xfa, + 0x0f, 0x29, 0x94, 0x26, 0x8a, 0xff, 0x09, 0x84, 0x89, 0xa4, 0x87, 0x40, 0x19, 0xb6, 0xeb, 0xa5, + 0x2d, 0x83, 0x24, 0x17, 0x59, 0x37, 0x97, 0x52, 0x9a, 0x55, 0xe6, 0x4d, 0x8e, 0xf1, 0xe4, 0x28, + 0xd5, 0xac, 0x36, 0x31, 0xe8, 0xb4, 0x41, 0x40, 0x5f, 0xad, 0xc7, 0xd9, 0x3a, 0x70, 0xf1, 0x20, + 0xac, 0xf9, 0xdc, 0x7c, 0x26, 0x34, 0x93, 0x61, 0x11, 0xbe, 0xce, 0x33, 0x13, 0xeb, 0xff, 0x1a, + 0x3e, 0x68, 0x97, 0x19, 0xa8, 0x78, 0x8c, 0x19, 0xba, 0x66, 0x02, 0x9b, 0xff, 0x1d, 0xfe, 0x17, + 0x93, 0xa0, 0x63, 0xf3, 0x4b, 0x14, 0x00, 0x00 }; diff --git a/wled00/set.cpp b/wled00/set.cpp index 18bedeaa..e01c27d2 100644 --- a/wled00/set.cpp +++ b/wled00/set.cpp @@ -646,22 +646,34 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage) if (subPage == 10) { strip.isMatrix = request->arg(F("SOMP")).toInt(); - strip.panelH = MAX(1,MIN(128,request->arg(F("PH")).toInt())); - strip.panelW = MAX(1,MIN(128,request->arg(F("PW")).toInt())); - strip.hPanels = MAX(1,MIN(8,request->arg(F("MPH")).toInt())); - strip.vPanels = MAX(1,MIN(8,request->arg(F("MPV")).toInt())); - strip.matrix.bottomStart = request->arg(F("PB")).toInt(); - strip.matrix.rightStart = request->arg(F("PR")).toInt(); - strip.matrix.vertical = request->arg(F("PV")).toInt(); - strip.matrix.serpentine = request->hasArg(F("PS")); - for (uint8_t i=0; ihasArg(pO)) break; - pO[l] = 'B'; strip.panel[i].bottomStart = request->arg(pO).toInt(); - pO[l] = 'R'; strip.panel[i].rightStart = request->arg(pO).toInt(); - pO[l] = 'V'; strip.panel[i].vertical = request->arg(pO).toInt(); - pO[l] = 'S'; strip.panel[i].serpentine = request->hasArg(pO); + // strip.panelH = MAX(1,MIN(128,request->arg(F("PH")).toInt())); + // strip.panelW = MAX(1,MIN(128,request->arg(F("PW")).toInt())); + strip.panel.clear(); // release memory if allocated + if (strip.isMatrix) { + strip.panels = MAX(1,MIN(WLED_MAX_PANELS,request->arg(F("MPC")).toInt())); + strip.matrix.bottomStart = request->arg(F("PB")).toInt(); + strip.matrix.rightStart = request->arg(F("PR")).toInt(); + strip.matrix.vertical = request->arg(F("PV")).toInt(); + strip.matrix.serpentine = request->hasArg(F("PS")); + strip.panel.reserve(strip.panels); // pre-allocate memory + for (uint8_t i=0; ihasArg(pO)) break; + pO[l] = 'B'; p.bottomStart = request->arg(pO).toInt(); + pO[l] = 'R'; p.rightStart = request->arg(pO).toInt(); + pO[l] = 'V'; p.vertical = request->arg(pO).toInt(); + pO[l] = 'S'; p.serpentine = request->hasArg(pO); + pO[l] = 'X'; p.xOffset = request->arg(pO).toInt(); + pO[l] = 'Y'; p.yOffset = request->arg(pO).toInt(); + pO[l] = 'W'; p.width = request->arg(pO).toInt(); + pO[l] = 'H'; p.height = request->arg(pO).toInt(); + strip.panel.push_back(p); + } + } else { + Segment::maxWidth = strip.getLengthTotal(); + Segment::maxHeight = 1; } strip.setUpMatrix(); // will check limits } diff --git a/wled00/xml.cpp b/wled00/xml.cpp index a88b4526..fa028b78 100644 --- a/wled00/xml.cpp +++ b/wled00/xml.cpp @@ -763,18 +763,20 @@ void getSettingsJS(byte subPage, char* dest) { sappend('v',SET_F("SOMP"),strip.isMatrix); #ifndef WLED_DISABLE_2D + oappend(SET_F("maxPanels=")); oappendi(WLED_MAX_PANELS); oappend(SET_F(";")); oappend(SET_F("resetPanels();")); if (strip.isMatrix) { - sappend('v',SET_F("PH"),strip.panelH); - sappend('v',SET_F("PW"),strip.panelW); - sappend('v',SET_F("MPH"),strip.hPanels); - sappend('v',SET_F("MPV"),strip.vPanels); + if(strip.panels>0){ + sappend('v',SET_F("PW"),strip.panel[0].width); //Set generator Width and Height to first panel size for convenience + sappend('v',SET_F("PH"),strip.panel[0].height); + } + sappend('v',SET_F("MPC"),strip.panels); sappend('v',SET_F("PB"),strip.matrix.bottomStart); sappend('v',SET_F("PR"),strip.matrix.rightStart); sappend('v',SET_F("PV"),strip.matrix.vertical); sappend('c',SET_F("PS"),strip.matrix.serpentine); // panels - for (uint8_t i=0; i