From 5f606bb0b7b872b7724e02c4c31c2f5c91dbe3e0 Mon Sep 17 00:00:00 2001 From: Christian Schwinne Date: Fri, 23 Sep 2022 01:02:49 +0200 Subject: [PATCH] DMX improvements (merge #2619) (#2794) * Art-Net improvements * Fix brightness level * Update cfg.cpp Co-authored-by: 4lloyd --- wled00/cfg.cpp | 1 + wled00/data/settings_sync.htm | 4 +- wled00/e131.cpp | 63 ++++-- wled00/html_settings.h | 415 +++++++++++++++++----------------- wled00/wled.h | 1 - 5 files changed, 258 insertions(+), 226 deletions(-) diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index 76e5871c..60bee4f8 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -373,6 +373,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) { CJSON(e131Universe, if_live_dmx[F("uni")]); CJSON(e131SkipOutOfSequence, if_live_dmx[F("seqskip")]); CJSON(DMXAddress, if_live_dmx[F("addr")]); + if (!DMXAddress || DMXAddress > 510) DMXAddress = 1; CJSON(DMXMode, if_live_dmx["mode"]); tdd = if_live[F("timeout")] | -1; diff --git a/wled00/data/settings_sync.htm b/wled00/data/settings_sync.htm index 595dac29..0e59c248 100644 --- a/wled00/data/settings_sync.htm +++ b/wled00/data/settings_sync.htm @@ -13,7 +13,7 @@ } function H(){window.open("https://kno.wled.ge/interfaces/udp-notifier/");} function B(){window.open("/settings","_self");} - function adj(){if (d.Sf.DI.value == 6454) {if (d.Sf.DA.value == 1) d.Sf.DA.value = 0; if (d.Sf.EU.value == 1) d.Sf.EU.value = 0;} + function adj(){if (d.Sf.DI.value == 6454) {if (d.Sf.EU.value == 1) d.Sf.EU.value = 0;} else if (d.Sf.DI.value == 5568) {if (d.Sf.DA.value == 0) d.Sf.DA.value = 1; if (d.Sf.EU.value == 0) d.Sf.EU.value = 1;} } // https://www.educative.io/edpresso/how-to-dynamically-load-a-js-file-in-javascript function loadJS(FILE_URL, async = true) { @@ -147,7 +147,7 @@ Multicast:
Start universe:
Reboot required. Check out LedFx!
Skip out-of-sequence packets:
-DMX start address:
+DMX start address:
DMX mode: