Advertisement
Guest User

Untitled

a guest
Nov 12th, 2021
141
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.95 KB | None | 0 0
  1. diff --git a/platformio.ini b/platformio.ini
  2. index 0a64a94..8b5b148 100644
  3. --- a/platformio.ini
  4. +++ b/platformio.ini
  5. @@ -261,7 +261,7 @@ lib_deps = ${esp8266.lib_deps}
  6. board = d1_mini
  7. platform = ${common.platform_wled_default}
  8. platform_packages = ${common.platform_packages}
  9. -upload_speed = 921600
  10. +upload_speed = 115200
  11. board_build.ldscript = ${common.ldscript_4m1m}
  12. build_unflags = ${common.build_unflags}
  13. build_flags = ${common.build_flags_esp8266}
  14. diff --git a/wled00/const.h b/wled00/const.h
  15. index 51205d2..5c9a2eb 100644
  16. --- a/wled00/const.h
  17. +++ b/wled00/const.h
  18. @@ -309,13 +309,13 @@
  19. #endif
  20. #endif
  21.  
  22. -#ifdef WLED_ENABLE_DMX
  23. -#if (LEDPIN == 2)
  24. - #undef LEDPIN
  25. - #define LEDPIN 3
  26. - #warning "Pin conflict compiling with DMX and LEDs on pin 2. The default LED pin has been changed to pin 3."
  27. -#endif
  28. -#endif
  29. +//#ifdef WLED_ENABLE_DMX
  30. +//#if (LEDPIN == 2)
  31. +// #undef LEDPIN
  32. +// #define LEDPIN 3
  33. +// #warning "Pin conflict compiling with DMX and LEDs on pin 2. The default LED pin has been changed to pin 3."
  34. +//#endif
  35. +//#endif
  36.  
  37. #ifndef DEFAULT_LED_COUNT
  38. #define DEFAULT_LED_COUNT 30
  39. diff --git a/wled00/set.cpp b/wled00/set.cpp
  40. index cfd737b..d9d9fc5 100644
  41. --- a/wled00/set.cpp
  42. +++ b/wled00/set.cpp
  43. @@ -402,7 +402,9 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
  44. if (subPage == 7)
  45. {
  46. int t = request->arg(F("PU")).toInt();
  47. - if (t >= 0 && t <= 63999) e131ProxyUniverse = t;
  48. + if (t >= 0 && t <= 63999) {
  49. + e131ProxyUniverse = t;
  50. + }
  51.  
  52. t = request->arg(F("CN")).toInt();
  53. if (t>0 && t<16) {
  54. diff --git a/wled00/src/dependencies/dmx/ESPDMX.cpp b/wled00/src/dependencies/dmx/ESPDMX.cpp
  55. index 6ad1268..0e7b3b2 100644
  56. --- a/wled00/src/dependencies/dmx/ESPDMX.cpp
  57. +++ b/wled00/src/dependencies/dmx/ESPDMX.cpp
  58. @@ -26,7 +26,7 @@
  59. #define BREAKFORMAT SERIAL_8N1
  60.  
  61. bool dmxStarted = false;
  62. -int sendPin = 2; //dafault on ESP8266
  63. +int sendPin = 1; //dafault on ESP8266
  64.  
  65. //DMX value array and size. Entry 0 will hold startbyte
  66. uint8_t dmxData[dmxMaxChannel] = {};
  67. @@ -36,7 +36,7 @@ int chanSize;
  68. void DMXESPSerial::init() {
  69. chanSize = defaultMax;
  70.  
  71. - Serial1.begin(DMXSPEED);
  72. + Serial.begin(DMXSPEED);
  73. pinMode(sendPin, OUTPUT);
  74. dmxStarted = true;
  75. }
  76. @@ -50,7 +50,7 @@ void DMXESPSerial::init(int chanQuant) {
  77.  
  78. chanSize = chanQuant;
  79.  
  80. - Serial1.begin(DMXSPEED);
  81. + Serial.begin(DMXSPEED);
  82. pinMode(sendPin, OUTPUT);
  83. dmxStarted = true;
  84. }
  85. @@ -78,7 +78,7 @@ void DMXESPSerial::write(int Channel, uint8_t value) {
  86.  
  87. void DMXESPSerial::end() {
  88. chanSize = 0;
  89. - Serial1.end();
  90. + Serial.end();
  91. dmxStarted = false;
  92. }
  93.  
  94. @@ -87,19 +87,19 @@ void DMXESPSerial::update() {
  95.  
  96. //Send break
  97. digitalWrite(sendPin, HIGH);
  98. - Serial1.begin(BREAKSPEED, BREAKFORMAT);
  99. - Serial1.write(0);
  100. - Serial1.flush();
  101. + Serial.begin(BREAKSPEED, BREAKFORMAT);
  102. + Serial.write(0);
  103. + Serial.flush();
  104. delay(1);
  105. - Serial1.end();
  106. + Serial.end();
  107.  
  108. //send data
  109. - Serial1.begin(DMXSPEED, DMXFORMAT);
  110. + Serial.begin(DMXSPEED, DMXFORMAT);
  111. digitalWrite(sendPin, LOW);
  112. - Serial1.write(dmxData, chanSize);
  113. - Serial1.flush();
  114. + Serial.write(dmxData, chanSize);
  115. + Serial.flush();
  116. delay(1);
  117. - Serial1.end();
  118. + Serial.end();
  119. }
  120.  
  121. // Function to update the DMX bus
  122. diff --git a/wled00/wled.h b/wled00/wled.h
  123. index 5ac2a58..88b4af9 100644
  124. --- a/wled00/wled.h
  125. +++ b/wled00/wled.h
  126. @@ -32,7 +32,7 @@
  127. #define WLED_ENABLE_MQTT // saves 12kb
  128. #endif
  129. #define WLED_ENABLE_ADALIGHT // saves 500b only
  130. -//#define WLED_ENABLE_DMX // uses 3.5kb (use LEDPIN other than 2)
  131. +#define WLED_ENABLE_DMX // uses 3.5kb (use LEDPIN other than 2)
  132. #ifndef WLED_DISABLE_LOXONE
  133. #define WLED_ENABLE_LOXONE // uses 1.2kb
  134. #endif
  135. @@ -327,7 +327,7 @@ WLED_GLOBAL bool arlsForceMaxBri _INIT(false); // enable to f
  136.  
  137. #ifdef WLED_ENABLE_DMX
  138. WLED_GLOBAL DMXESPSerial dmx;
  139. -WLED_GLOBAL uint16_t e131ProxyUniverse _INIT(0); // output this E1.31 (sACN) / ArtNet universe via MAX485 (0 = disabled)
  140. +WLED_GLOBAL uint16_t e131ProxyUniverse _INIT(4); // output this E1.31 (sACN) / ArtNet universe via MAX485 (0 = disabled)
  141. #endif
  142. WLED_GLOBAL uint16_t e131Universe _INIT(1); // settings for E1.31 (sACN) protocol (only DMX_MODE_MULTIPLE_* can span over consequtive universes)
  143. WLED_GLOBAL uint16_t e131Port _INIT(5568); // DMX in port. E1.31 default is 5568, Art-Net is 6454
  144. diff --git a/wled00/xml.cpp b/wled00/xml.cpp
  145. index b10acee..dcdd703 100644
  146. --- a/wled00/xml.cpp
  147. +++ b/wled00/xml.cpp
  148. @@ -325,7 +325,7 @@ void getSettingsJS(byte subPage, char* dest)
  149. if (!mods.isNull()) fillUMPins(mods);
  150.  
  151. #ifdef WLED_ENABLE_DMX
  152. - oappend(SET_F(",2")); // DMX hardcoded pin
  153. + oappend(SET_F(",1")); // DMX hardcoded pin
  154. #endif
  155.  
  156. //Note: Using pin 3 (RX) disables Adalight / Serial JSON
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement