Simplification of ledmap width and height segment settings

(no recreation of panels anymore so back to default shows original)
This commit is contained in:
Ewoud
2023-03-17 13:44:52 +01:00
parent 72a77bea9c
commit e3e5825618
2 changed files with 4 additions and 14 deletions

View File

@@ -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
}

View File

@@ -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