Simplification of ledmap width and height segment settings
(no recreation of panels anymore so back to default shows original)
This commit is contained in:
@@ -2082,21 +2082,11 @@ bool WS2812FX::deserializeMap(uint8_t n) {
|
|||||||
|
|
||||||
JsonArray map = doc[F("map")];
|
JsonArray map = doc[F("map")];
|
||||||
if (!map.isNull() && map.size()) { // not an empty map
|
if (!map.isNull() && map.size()) { // not an empty map
|
||||||
|
|
||||||
//WLEDMM: support ledmap file properties width and height
|
//WLEDMM: support ledmap file properties width and height
|
||||||
if (doc[F("width")]>0 && doc[F("height")]>0) {
|
if (doc[F("width")]>0 && doc[F("height")]>0) {
|
||||||
panels = 1;
|
Segment::maxWidth = doc[F("width")];;
|
||||||
panel.clear();
|
Segment::maxHeight = doc[F("height")];;
|
||||||
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;
|
|
||||||
|
|
||||||
resetSegments(true); //WLEDMM not makeAutoSegments() as we only want to change bounds
|
resetSegments(true); //WLEDMM not makeAutoSegments() as we only want to change bounds
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -8,7 +8,7 @@
|
|||||||
*/
|
*/
|
||||||
|
|
||||||
// version code in format yymmddb (b = daily build)
|
// 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
|
//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