Bugfix 2D without ledmap
index.js: remove showToast when ledmap not found FX_2DFCN: Check on ledmapsize >0 for doing logical and physical mapping
This commit is contained in:
@@ -80,7 +80,7 @@ void WS2812FX::setUpMatrix(bool reset) {
|
|||||||
customMappingSize = Segment::maxWidth * Segment::maxHeight;
|
customMappingSize = Segment::maxWidth * Segment::maxHeight;
|
||||||
|
|
||||||
uint16_t *customMappingTableCombi = nullptr; //WLEDMM: Idea @Troy#2642
|
uint16_t *customMappingTableCombi = nullptr; //WLEDMM: Idea @Troy#2642
|
||||||
if (loadedLedmap >= 0) { //WLEDMM: @Troy#2642 : include ledmap = 0 as default ledmap
|
if (customMappingSizeLedmap > 0) { //WLEDMM: @Troy#2642 : include ledmap = 0 as default ledmap
|
||||||
customMappingTableCombi = new uint16_t[customMappingSize];
|
customMappingTableCombi = new uint16_t[customMappingSize];
|
||||||
for (int i=0; i<customMappingSize;i++) customMappingTableCombi[i] = (uint16_t)0xFFFFU; //WLEDMM: init with no show
|
for (int i=0; i<customMappingSize;i++) customMappingTableCombi[i] = (uint16_t)0xFFFFU; //WLEDMM: init with no show
|
||||||
}
|
}
|
||||||
@@ -96,7 +96,7 @@ void WS2812FX::setUpMatrix(bool reset) {
|
|||||||
x = (p.vertical?p.bottomStart:p.rightStart) ? h-i-1 : i;
|
x = (p.vertical?p.bottomStart:p.rightStart) ? h-i-1 : i;
|
||||||
x = p.serpentine && j%2 ? h-x-1 : x;
|
x = p.serpentine && j%2 ? h-x-1 : x;
|
||||||
uint16_t index = (p.yOffset + (p.vertical?x:y)) * Segment::maxWidth + p.xOffset + (p.vertical?y:x);
|
uint16_t index = (p.yOffset + (p.vertical?x:y)) * Segment::maxWidth + p.xOffset + (p.vertical?y:x);
|
||||||
if (loadedLedmap >= 0) { //WLEDMM: @Troy#2642 : include ledmap = 0 as default ledmap
|
if (customMappingSizeLedmap > 0) { //WLEDMM: @Troy#2642 : include ledmap = 0 as default ledmap
|
||||||
if (index < customMappingSizeLedmap && customMappingTable[index] < customMappingSize)
|
if (index < customMappingSizeLedmap && customMappingTable[index] < customMappingSize)
|
||||||
customMappingTableCombi[customMappingTable[index]] = pix; //WLEDMM: allow for 2 transitions if reset = false (ledmap and logical to physical)
|
customMappingTableCombi[customMappingTable[index]] = pix; //WLEDMM: allow for 2 transitions if reset = false (ledmap and logical to physical)
|
||||||
}
|
}
|
||||||
@@ -106,7 +106,7 @@ void WS2812FX::setUpMatrix(bool reset) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (loadedLedmap >= 0) { //WLEDMM: @Troy#2642 : include ledmap = 0 as default ledmap
|
if (customMappingSizeLedmap > 0) { //WLEDMM: @Troy#2642 : include ledmap = 0 as default ledmap
|
||||||
for (size_t i = 0; i < customMappingSize; i++) {
|
for (size_t i = 0; i < customMappingSize; i++) {
|
||||||
customMappingTable[i] = customMappingTableCombi[i];
|
customMappingTable[i] = customMappingTableCombi[i];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2907,7 +2907,7 @@ function fetchAndExecute(url, name, callback)
|
|||||||
callback(text);
|
callback(text);
|
||||||
})
|
})
|
||||||
.catch(function (error) {
|
.catch(function (error) {
|
||||||
showToast("Error getting " + name, true);
|
// showToast("Error getting " + name, true);
|
||||||
console.log(error);
|
console.log(error);
|
||||||
})
|
})
|
||||||
.finally(() => {
|
.finally(() => {
|
||||||
|
|||||||
1476
wled00/html_ui.h
1476
wled00/html_ui.h
File diff suppressed because it is too large
Load Diff
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// version code in format yymmddb (b = daily build)
|
||||||
#define VERSION 2302131
|
#define VERSION 2302140
|
||||||
|
|
||||||
//uncomment this if you have a "my_config.h" file you'd like to use
|
//uncomment this if you have a "my_config.h" file you'd like to use
|
||||||
//#define WLED_USE_MY_CONFIG
|
//#define WLED_USE_MY_CONFIG
|
||||||
|
|||||||
Reference in New Issue
Block a user