From fd06ff08c7f0109eaa3649decc6249d83367ed5f Mon Sep 17 00:00:00 2001 From: cschwinne Date: Mon, 11 May 2020 11:51:11 +0200 Subject: [PATCH] Move DMX proxy setting from sync to DMX settings --- wled00/html_settings.h | 4 ++-- wled00/set.cpp | 9 ++++----- wled00/xml.cpp | 5 ++--- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/wled00/html_settings.h b/wled00/html_settings.h index 915f206c..2aeb60b3 100644 --- a/wled00/html_settings.h +++ b/wled00/html_settings.h @@ -212,7 +212,8 @@ function S(){GCH(15);GetV();mMap();}function H(){window.open("https://github.com

Imma firin ma lazer (if it has DMX support)

-This functionality may be disabled by DMX Proxy Universe ≠ 0 on sync settings page
+Proxy Universe from E1.31 to DMX (0=disabled)
+This will disable the LED data output to DMX configurable below

Number of fixtures is taken from LED config page
Channels per fixture (15 max):
@@ -294,7 +295,6 @@ Type:
Port:
Multicast:
-Proxy Universe to DMX via MAX485 DI pin connected to D4 (0=disabled, compile with WLED_ENABLE_DMX)
Start universe:
Reboot required. Check out LedFx!
Skip out-of-sequence packets:
diff --git a/wled00/set.cpp b/wled00/set.cpp index 803bd8cd..54581d01 100644 --- a/wled00/set.cpp +++ b/wled00/set.cpp @@ -144,10 +144,6 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage) e131Multicast = request->hasArg("EM"); t = request->arg("EP").toInt(); if (t > 0) e131Port = t; - #ifdef WLED_ENABLE_DMX // include only if DMX is enabled - t = request->arg("PU").toInt(); - if (t >= 0 && t <= 63999) e131ProxyUniverse = t; - #endif t = request->arg("EU").toInt(); if (t >= 0 && t <= 63999) e131Universe = t; t = request->arg("DA").toInt(); @@ -301,7 +297,10 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage) #ifdef WLED_ENABLE_DMX // include only if DMX is enabled if (subPage == 7) { - int t = request->arg("CN").toInt(); + int t = request->arg("PU").toInt(); + if (t >= 0 && t <= 63999) e131ProxyUniverse = t; + + t = request->arg("CN").toInt(); if (t>0 && t<16) { DMXChannels = t; } diff --git a/wled00/xml.cpp b/wled00/xml.cpp index 6ae8a31f..c03240e0 100644 --- a/wled00/xml.cpp +++ b/wled00/xml.cpp @@ -330,9 +330,6 @@ void getSettingsJS(byte subPage, char* dest) sappend('v',"EP",e131Port); sappend('c',"ES",e131SkipOutOfSequence); sappend('c',"EM",e131Multicast); - #ifdef WLED_ENABLE_DMX - sappend('v',"PU",e131ProxyUniverse); - #endif sappend('v',"EU",e131Universe); sappend('v',"DA",DMXAddress); sappend('v',"DM",DMXMode); @@ -459,6 +456,8 @@ void getSettingsJS(byte subPage, char* dest) #ifdef WLED_ENABLE_DMX // include only if DMX is enabled if (subPage == 7) { + sappend('v',"PU",e131ProxyUniverse); + sappend('v',"CN",DMXChannels); sappend('v',"CG",DMXGap); sappend('v',"CS",DMXStart);