Save and load the e131 Proxy Universe setting in the DMX menu (#2365)

This commit is contained in:
Jeff Cooper 2021-11-30 17:10:23 -05:00 committed by GitHub
parent 02fb2550d0
commit 9547ac353d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -400,6 +400,8 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
if (i > 14) break; if (i > 14) break;
CJSON(DMXFixtureMap[i],dmx_fixmap[i]); CJSON(DMXFixtureMap[i],dmx_fixmap[i]);
} }
CJSON(e131ProxyUniverse, dmx[F("e131proxy")]);
#endif #endif
DEBUG_PRINTLN(F("Starting usermod config.")); DEBUG_PRINTLN(F("Starting usermod config."));
@ -736,8 +738,11 @@ void serializeConfig() {
dmx[F("start-led")] = DMXStartLED; dmx[F("start-led")] = DMXStartLED;
JsonArray dmx_fixmap = dmx.createNestedArray(F("fixmap")); JsonArray dmx_fixmap = dmx.createNestedArray(F("fixmap"));
for (byte i = 0; i < 15; i++) for (byte i = 0; i < 15; i++) {
dmx_fixmap.add(DMXFixtureMap[i]); dmx_fixmap.add(DMXFixtureMap[i]);
}
dmx[F("e131proxy")] = e131ProxyUniverse;
#endif #endif
JsonObject usermods_settings = doc.createNestedObject("um"); JsonObject usermods_settings = doc.createNestedObject("um");