From fb7fa5ab6c5608c1e422dd2a0f6049ae3a4da5f5 Mon Sep 17 00:00:00 2001 From: Will Tatam Date: Thu, 23 Mar 2023 18:47:57 +0000 Subject: [PATCH] Place port setup all in dmx.cpp --- wled00/dmx.cpp | 2 ++ wled00/wled.h | 3 --- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/wled00/dmx.cpp b/wled00/dmx.cpp index c19a7602..a9ec4e2a 100644 --- a/wled00/dmx.cpp +++ b/wled00/dmx.cpp @@ -95,8 +95,10 @@ void handleDMX() {} #ifdef WLED_ENABLE_DMX_INPUT +dmx_port_t dmxPort = 2; void initDMX() { /* Set the DMX hardware pins to the pins that we want to use. */ + int dmxTransmitPin, dmxReceivePin, dmxEnablePin = -1; dmx_set_pin(dmxPort, dmxTransmitPin, dmxReceivePin, dmxEnablePin); /* Now we can install the DMX driver! We'll tell it which DMX port to use and diff --git a/wled00/wled.h b/wled00/wled.h index 8dd8eb98..70fa9e46 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -398,9 +398,6 @@ WLED_GLOBAL bool arlsForceMaxBri _INIT(false); // enable to f #endif WLED_GLOBAL uint16_t e131ProxyUniverse _INIT(0); // output this E1.31 (sACN) / ArtNet universe via MAX485 (0 = disabled) #endif -#ifdef WLED_ENABLE_DMX_INPUT -dmx_port_t dmxPort = 1; -#endif WLED_GLOBAL uint16_t e131Universe _INIT(1); // settings for E1.31 (sACN) protocol (only DMX_MODE_MULTIPLE_* can span over consequtive universes) WLED_GLOBAL uint16_t e131Port _INIT(5568); // DMX in port. E1.31 default is 5568, Art-Net is 6454 WLED_GLOBAL byte e131Priority _INIT(0); // E1.31 port priority (if != 0 priority handling is active)