Merge remote-tracking branch 'origin/ac_main' into mdev

This commit is contained in:
Ewoud
2022-11-28 19:58:51 +01:00
17 changed files with 815 additions and 781 deletions

View File

@@ -243,7 +243,7 @@ void deserializeSegment(JsonObject elem, byte it, byte presetId)
getVal(elem["ix"], &seg.intensity);
uint8_t pal = seg.palette;
if (getVal(elem["pal"], &pal, 1, strip.getPaletteCount())) seg.setPalette(pal);
if (getVal(elem["pal"], &pal)) seg.setPalette(pal);
getVal(elem["c1"], &seg.custom1);
getVal(elem["c2"], &seg.custom2);
@@ -678,7 +678,6 @@ void serializeInfo(JsonObject root)
leds[F("maxseg")] = strip.getMaxSegments();
//leds[F("actseg")] = strip.getActiveSegmentsNum();
//leds[F("seglock")] = false; //might be used in the future to prevent modifications to segment config
leds[F("cpal")] = strip.customPalettes.size(); //number of custom palettes
#ifndef WLED_DISABLE_2D
if (strip.isMatrix) {
@@ -748,6 +747,7 @@ void serializeInfo(JsonObject root)
root[F("fxcount")] = strip.getModeCount();
root[F("palcount")] = strip.getPaletteCount();
root[F("cpalcount")] = strip.customPalettes.size(); //number of custom palettes
JsonArray ledmaps = root.createNestedArray(F("maps"));
for (size_t i=0; i<10; i++) {