Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/platformio.ini b/platformio.ini
- index 0a64a94..8b5b148 100644
- --- a/platformio.ini
- +++ b/platformio.ini
- @@ -261,7 +261,7 @@ lib_deps = ${esp8266.lib_deps}
- board = d1_mini
- platform = ${common.platform_wled_default}
- platform_packages = ${common.platform_packages}
- -upload_speed = 921600
- +upload_speed = 115200
- board_build.ldscript = ${common.ldscript_4m1m}
- build_unflags = ${common.build_unflags}
- build_flags = ${common.build_flags_esp8266}
- diff --git a/wled00/const.h b/wled00/const.h
- index 51205d2..5c9a2eb 100644
- --- a/wled00/const.h
- +++ b/wled00/const.h
- @@ -309,13 +309,13 @@
- #endif
- #endif
- -#ifdef WLED_ENABLE_DMX
- -#if (LEDPIN == 2)
- - #undef LEDPIN
- - #define LEDPIN 3
- - #warning "Pin conflict compiling with DMX and LEDs on pin 2. The default LED pin has been changed to pin 3."
- -#endif
- -#endif
- +//#ifdef WLED_ENABLE_DMX
- +//#if (LEDPIN == 2)
- +// #undef LEDPIN
- +// #define LEDPIN 3
- +// #warning "Pin conflict compiling with DMX and LEDs on pin 2. The default LED pin has been changed to pin 3."
- +//#endif
- +//#endif
- #ifndef DEFAULT_LED_COUNT
- #define DEFAULT_LED_COUNT 30
- diff --git a/wled00/set.cpp b/wled00/set.cpp
- index cfd737b..d9d9fc5 100644
- --- a/wled00/set.cpp
- +++ b/wled00/set.cpp
- @@ -402,7 +402,9 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
- if (subPage == 7)
- {
- int t = request->arg(F("PU")).toInt();
- - if (t >= 0 && t <= 63999) e131ProxyUniverse = t;
- + if (t >= 0 && t <= 63999) {
- + e131ProxyUniverse = t;
- + }
- t = request->arg(F("CN")).toInt();
- if (t>0 && t<16) {
- diff --git a/wled00/src/dependencies/dmx/ESPDMX.cpp b/wled00/src/dependencies/dmx/ESPDMX.cpp
- index 6ad1268..0e7b3b2 100644
- --- a/wled00/src/dependencies/dmx/ESPDMX.cpp
- +++ b/wled00/src/dependencies/dmx/ESPDMX.cpp
- @@ -26,7 +26,7 @@
- #define BREAKFORMAT SERIAL_8N1
- bool dmxStarted = false;
- -int sendPin = 2; //dafault on ESP8266
- +int sendPin = 1; //dafault on ESP8266
- //DMX value array and size. Entry 0 will hold startbyte
- uint8_t dmxData[dmxMaxChannel] = {};
- @@ -36,7 +36,7 @@ int chanSize;
- void DMXESPSerial::init() {
- chanSize = defaultMax;
- - Serial1.begin(DMXSPEED);
- + Serial.begin(DMXSPEED);
- pinMode(sendPin, OUTPUT);
- dmxStarted = true;
- }
- @@ -50,7 +50,7 @@ void DMXESPSerial::init(int chanQuant) {
- chanSize = chanQuant;
- - Serial1.begin(DMXSPEED);
- + Serial.begin(DMXSPEED);
- pinMode(sendPin, OUTPUT);
- dmxStarted = true;
- }
- @@ -78,7 +78,7 @@ void DMXESPSerial::write(int Channel, uint8_t value) {
- void DMXESPSerial::end() {
- chanSize = 0;
- - Serial1.end();
- + Serial.end();
- dmxStarted = false;
- }
- @@ -87,19 +87,19 @@ void DMXESPSerial::update() {
- //Send break
- digitalWrite(sendPin, HIGH);
- - Serial1.begin(BREAKSPEED, BREAKFORMAT);
- - Serial1.write(0);
- - Serial1.flush();
- + Serial.begin(BREAKSPEED, BREAKFORMAT);
- + Serial.write(0);
- + Serial.flush();
- delay(1);
- - Serial1.end();
- + Serial.end();
- //send data
- - Serial1.begin(DMXSPEED, DMXFORMAT);
- + Serial.begin(DMXSPEED, DMXFORMAT);
- digitalWrite(sendPin, LOW);
- - Serial1.write(dmxData, chanSize);
- - Serial1.flush();
- + Serial.write(dmxData, chanSize);
- + Serial.flush();
- delay(1);
- - Serial1.end();
- + Serial.end();
- }
- // Function to update the DMX bus
- diff --git a/wled00/wled.h b/wled00/wled.h
- index 5ac2a58..88b4af9 100644
- --- a/wled00/wled.h
- +++ b/wled00/wled.h
- @@ -32,7 +32,7 @@
- #define WLED_ENABLE_MQTT // saves 12kb
- #endif
- #define WLED_ENABLE_ADALIGHT // saves 500b only
- -//#define WLED_ENABLE_DMX // uses 3.5kb (use LEDPIN other than 2)
- +#define WLED_ENABLE_DMX // uses 3.5kb (use LEDPIN other than 2)
- #ifndef WLED_DISABLE_LOXONE
- #define WLED_ENABLE_LOXONE // uses 1.2kb
- #endif
- @@ -327,7 +327,7 @@ WLED_GLOBAL bool arlsForceMaxBri _INIT(false); // enable to f
- #ifdef WLED_ENABLE_DMX
- WLED_GLOBAL DMXESPSerial dmx;
- -WLED_GLOBAL uint16_t e131ProxyUniverse _INIT(0); // output this E1.31 (sACN) / ArtNet universe via MAX485 (0 = disabled)
- +WLED_GLOBAL uint16_t e131ProxyUniverse _INIT(4); // output this E1.31 (sACN) / ArtNet universe via MAX485 (0 = disabled)
- #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
- diff --git a/wled00/xml.cpp b/wled00/xml.cpp
- index b10acee..dcdd703 100644
- --- a/wled00/xml.cpp
- +++ b/wled00/xml.cpp
- @@ -325,7 +325,7 @@ void getSettingsJS(byte subPage, char* dest)
- if (!mods.isNull()) fillUMPins(mods);
- #ifdef WLED_ENABLE_DMX
- - oappend(SET_F(",2")); // DMX hardcoded pin
- + oappend(SET_F(",1")); // DMX hardcoded pin
- #endif
- //Note: Using pin 3 (RX) disables Adalight / Serial JSON
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement