GFX/Preview done right if > 4096 pixels + unlimited virtual pixels in 2d

This commit is contained in:
Ewoud
2023-10-24 16:58:35 +02:00
parent 7f5ddc79da
commit 0092e49eb3
2 changed files with 29 additions and 13 deletions

View File

@@ -51,8 +51,9 @@ void WS2812FX::setUpMatrix() {
}
}
// safety check
if (Segment::maxWidth * Segment::maxHeight > MAX_LEDS || Segment::maxWidth <= 1 || Segment::maxHeight <= 1) {
// safety check
// WLEDMM no chech on Segment::maxWidth * Segment::maxHeight > MAX_LEDS ||
if (Segment::maxWidth <= 1 || Segment::maxHeight <= 1) {
DEBUG_PRINTF("2D Bounds error. %d x %d\n", Segment::maxWidth, Segment::maxHeight);
isMatrix = false;
Segment::maxWidth = _length;
@@ -158,7 +159,7 @@ void WS2812FX::setUpMatrix() {
} else { // memory allocation error
customMappingTableSize = 0;
USER_PRINTLN(F("Ledmap alloc error."));
isMatrix = false;
isMatrix = false; //WLEDMM does not like this done in teh background while end users are confused whats happened...
panels = 0;
panel.clear();
Segment::maxWidth = _length;