Merge remote-tracking branch 'upstream/main' into mdev

Some additions:

pio.ini: add debug entries
cfg.cpp, set.cpp, xml/cpp: keep storing basic 2D setup

index.js: use ledmapFileNames

settings_2D.htm: keep using basic and advanced

FX_2Dfcn.cpp: use gaptable and also MM ledmaps

FX_fcn.cpp: extend enumerateledmaps with AC ledmapNames (but not used in UI)
This commit is contained in:
Ewoud
2023-02-22 16:09:27 +01:00
62 changed files with 2521 additions and 8104 deletions

View File

@@ -48,6 +48,12 @@
void deserializeSegment(JsonObject elem, byte it, byte presetId)
{
//WLEDMM add USER_PRINT
String temp;
serializeJson(elem, temp);
USER_PRINT("deserializeSegment ");
USER_PRINTLN(temp);
byte id = elem["id"] | it;
if (id >= strip.getMaxSegments()) return;
@@ -330,6 +336,12 @@ void deserializeSegment(JsonObject elem, byte it, byte presetId)
// presetId is non-0 if called from handlePreset()
bool deserializeState(JsonObject root, byte callMode, byte presetId)
{
//WLEDMM add USER_PRINT
String temp;
serializeJson(root, temp);
USER_PRINT("deserializeState ");
USER_PRINTLN(temp);
bool stateResponse = root[F("v")] | false;
#if defined(WLED_DEBUG) && defined(WLED_DEBUG_HOST)
@@ -767,8 +779,14 @@ void serializeInfo(JsonObject root)
root[F("cpalcount")] = strip.customPalettes.size(); //number of custom palettes
JsonArray ledmaps = root.createNestedArray(F("maps"));
for (size_t i=0; i<16; i++) { //WLEDMM include segment name ledmaps
if ((ledMaps>>i) & 0x0001) ledmaps.add(i);
for (size_t i=0; i<WLED_MAX_LEDMAPS; i++) {
if ((ledMaps>>i) & 0x00000001U) {
JsonObject ledmaps0 = ledmaps.createNestedObject();
ledmaps0["id"] = i;
#ifndef ESP8266
if (i && ledmapNames[i-1]) ledmaps0["n"] = ledmapNames[i-1];
#endif
}
}
//WLEDMM: add busses.length to outputs
@@ -898,9 +916,9 @@ void serializeInfo(JsonObject root)
#ifndef WLED_DISABLE_ALEXA
os += 0x40;
#endif
#ifndef WLED_DISABLE_BLYNK
os += 0x20;
#endif
//os += 0x20; // indicated now removed Blynk support, may be reused to indicate another build-time option
#ifdef USERMOD_CRONIXIE
os += 0x10;
#endif