diff --git a/wled00/FX_2Dfcn.cpp b/wled00/FX_2Dfcn.cpp index d02b540d..b0e425e8 100644 --- a/wled00/FX_2Dfcn.cpp +++ b/wled00/FX_2Dfcn.cpp @@ -133,6 +133,7 @@ void WS2812FX::setUpMatrix(bool reset) { if (customMappingSizeLedmap > 0) { //WLEDMM: @Troy#2642 : include ledmap = 0 as default ledmap if (index < customMappingSizeLedmap && customMappingTable[index] < customMappingSize) customMappingTableCombi[customMappingTable[index]] = pix; //WLEDMM: allow for 2 transitions if reset = false (ledmap and logical to physical) + pix++; } else { if (!gapTable || (gapTable && gapTable[index] > 0)) customMappingTable[index] = pix; // a useful pixel (otherwise -1 is retained) @@ -142,6 +143,13 @@ void WS2812FX::setUpMatrix(bool reset) { } } + if (customMappingSizeLedmap > 0) { //WLEDMM: @Troy#2642 : include ledmap = 0 as default ledmap + for (size_t i = 0; i < customMappingSize; i++) { + customMappingTable[i] = customMappingTableCombi[i]; + } + delete[] customMappingTableCombi; + } + // delete gap array as we no longer need it if (gapTable) delete[] gapTable; @@ -160,7 +168,7 @@ void WS2812FX::setUpMatrix(bool reset) { panel.clear(); Segment::maxWidth = _length; Segment::maxHeight = 1; - resetSegments(); + //WLEDMM: no resetSegments here, only do it in set.cpp/handleSettingsSet } } #else diff --git a/wled00/wled.h b/wled00/wled.h index 50b54c9b..3b0001f5 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2302230 +#define VERSION 2302231 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG