From e3e5825618db9427ff65261ea30704fe6c37fa7c Mon Sep 17 00:00:00 2001 From: Ewoud Date: Fri, 17 Mar 2023 13:44:52 +0100 Subject: [PATCH] Simplification of ledmap width and height segment settings (no recreation of panels anymore so back to default shows original) --- wled00/FX_fcn.cpp | 16 +++------------- wled00/wled.h | 2 +- 2 files changed, 4 insertions(+), 14 deletions(-) diff --git a/wled00/FX_fcn.cpp b/wled00/FX_fcn.cpp index 755f8b6b..f3ad9a30 100644 --- a/wled00/FX_fcn.cpp +++ b/wled00/FX_fcn.cpp @@ -2082,21 +2082,11 @@ bool WS2812FX::deserializeMap(uint8_t n) { JsonArray map = doc[F("map")]; if (!map.isNull() && map.size()) { // not an empty map + //WLEDMM: support ledmap file properties width and height if (doc[F("width")]>0 && doc[F("height")]>0) { - panels = 1; - panel.clear(); - panel.reserve(1U); // pre-allocate memory for panels - Panel p; - p.bottomStart = p.rightStart = p.vertical = p.serpentine = false; - p.xOffset = p.yOffset = 0; - p.width = doc[F("width")]; - p.height = doc[F("height")]; - strip.panel.push_back(p); - - Segment::maxWidth = p.width; - Segment::maxHeight = p.height; - + Segment::maxWidth = doc[F("width")];; + Segment::maxHeight = doc[F("height")];; resetSegments(true); //WLEDMM not makeAutoSegments() as we only want to change bounds } diff --git a/wled00/wled.h b/wled00/wled.h index 4fb1b02e..0598fff0 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -8,7 +8,7 @@ */ // version code in format yymmddb (b = daily build) -#define VERSION 2303162 +#define VERSION 2303170 //uncomment this if you have a "my_config.h" file you'd like to use //#define WLED_USE_MY_CONFIG