diff --git a/platformio.ini b/platformio.ini index a36d4f48..8ec4ea5f 100644 --- a/platformio.ini +++ b/platformio.ini @@ -921,7 +921,7 @@ build_flags_S = ; -D WLED_DISABLE_HUESYNC ; -D WLED_DISABLE_MQTT ; -D WLED_DISABLE_INFRARED - ; -D WLED_ENABLE_DMX + ; -D WLED_ENABLE_DMX_OUTPUT lib_deps_S = https://github.com/kosme/arduinoFFT#develop @ 1.9.2+sha.419d7b0 ;; used for USERMOD_AUDIOREACTIVE - using "known working" hash @@ -1548,7 +1548,7 @@ build_flags = ${esp32_4MB_V4_S_base.build_flags} -D WLED_DISABLE_ALEXA ; RAM 116 bytes; FLASH 13524 bytes -D WLED_DISABLE_MQTT ; RAM 216 bytes; FLASH 16496 bytes -D WLED_DISABLE_INFRARED ;RAM 136 bytes; FLASH 24492 bytes ewowi: disabled to stay below 100% - ; -D WLED_ENABLE_DMX + ; -D WLED_ENABLE_DMX_OUTPUT ; -D WLED_DEBUG ; -D SR_DEBUG ; -D MIC_LOGGER @@ -1586,7 +1586,7 @@ build_flags = ${esp32_4MB_V4_S_base.build_flags} -D WLED_DISABLE_MQTT ; RAM 216 bytes; FLASH 16496 bytes -D WLED_DISABLE_INFRARED ;RAM 136 bytes; FLASH 24492 bytes ewowi: disabled to stay below 100% ;-D WLED_DISABLE_ADALIGHT ;; To disable serial protocols (see upstream #3128) - ; -D WLED_ENABLE_DMX + ; -D WLED_ENABLE_DMX_OUTPUT ; -D WLED_DEBUG ; -D SR_DEBUG ; -D MIC_LOGGER @@ -1610,7 +1610,7 @@ build_flags = ${esp32_4MB_V4_M_base.build_flags} -D WLED_DISABLE_ALEXA ;; RAM 116 bytes; FLASH 13524 bytes ; -D WLED_DISABLE_MQTT ;; RAM 216 bytes; FLASH 16496 bytes ; -D WLED_DISABLE_INFRARED ;;RAM 136 bytes; FLASH 24492 bytes - ; -D WLED_ENABLE_DMX + ; -D WLED_ENABLE_DMX_OUTPUT ; -D WLED_DEBUG ; -D SR_DEBUG ; -D MIC_LOGGER @@ -1627,7 +1627,7 @@ build_unflags = -D USE_ALT_DISPLAY ;; four line display seems to have problems with I2C - it hangs during usermod setup -D USERMOD_FOUR_LINE_DISPLAY ;; see above -D USERMOD_ROTARY_ENCODER_UI ;; see above - -D WLED_ENABLE_DMX ;; disabled because it does not work with ESP-IDF 4.4.x (buggy driver in SparkFunDMX) + -D WLED_ENABLE_DMX_OUTPUT ;; disabled because it does not work with ESP-IDF 4.4.x (buggy driver in SparkFunDMX) build_flags = ${common.build_flags} ${esp32s3.build_flags} -Wno-misleading-indentation -Wno-format-truncation ${common_mm.build_flags_S} ${common_mm.build_flags_M} @@ -1766,7 +1766,7 @@ board_build.flash_mode = qio upload_speed = 256000 ;; 921600 build_unflags = ${common.build_unflags} -D USERMOD_DALLASTEMPERATURE ;; disabled because it hangs during usermod setup on -S3 (autodetect broken?) - -D WLED_ENABLE_DMX ;; disabled because it does not work with ESP-IDF 4.4.x (buggy driver in SparkFunDMX) + -D WLED_ENABLE_DMX_OUTPUT ;; disabled because it does not work with ESP-IDF 4.4.x (buggy driver in SparkFunDMX) -D WLED_ENABLE_DMX_INPUT ;; needs more testing build_flags = ${common.build_flags} ${esp32s2.build_flags} @@ -1820,7 +1820,7 @@ build_unflags = ${common.build_unflags} -DARDUINO_USB_CDC_ON_BOOT=1 -DARDUINO_USB_DFU_ON_BOOT=0 -D USERMOD_DALLASTEMPERATURE ;; disabled because it hangs during usermod setup on -S3 (autodetect broken?) - -D WLED_ENABLE_DMX ;; disabled because it does not work with ESP-IDF 4.4.x (buggy driver in SparkFunDMX) + -D WLED_ENABLE_DMX_OUTPUT ;; disabled because it does not work with ESP-IDF 4.4.x (buggy driver in SparkFunDMX) -D WLED_ENABLE_DMX_INPUT ;; needs more testing build_flags = ${common.build_flags} ${esp32s2.build_flags} ;; ${Debug_Flags.build_flags} @@ -1872,7 +1872,7 @@ build_unflags = ${common.build_unflags} -D USE_ALT_DISPLAY ;; four line display seems to have problems with I2C - it hangs during usermod setup -D USERMOD_FOUR_LINE_DISPLAY ;; see above -D USERMOD_ROTARY_ENCODER_UI ;; see above - -D WLED_ENABLE_DMX ;; disabled because it does not work with ESP-IDF 4.4.x (buggy driver in SparkFunDMX) + -D WLED_ENABLE_DMX_OUTPUT ;; disabled because it does not work with ESP-IDF 4.4.x (buggy driver in SparkFunDMX) -D WLED_ENABLE_DMX_INPUT ;; needs more testing ;-D WLED_DEBUG_HOST='"192.168.x.x"' ;; to disable net print -D USERMOD_ANIMARTRIX ;; Tips our memory usage over the limit @@ -2104,7 +2104,7 @@ build_flags = ${esp32_4MB_M_base.build_flags} ; -D WLED_DISABLE_HUESYNC ; -D WLED_DISABLE_MQTT ; -D WLED_DISABLE_INFRARED - ; -D WLED_ENABLE_DMX + ; -D WLED_ENABLE_DMX_OUTPUT ; RAM: [== ] 24.4% (used 79812 bytes from 327680 bytes) ; Flash: [========= ] 90.4% (used 1422581 bytes from 1572864 bytes) diff --git a/tools/cdata.js b/tools/cdata.js index 8959a588..54cd39bc 100644 --- a/tools/cdata.js +++ b/tools/cdata.js @@ -359,7 +359,7 @@ writeChunks( method: "plaintext", filter: "html-minify", mangle: (str) => ` -#ifdef WLED_ENABLE_DMX +#ifdef WLED_ENABLE_DMX_OUTPUT ${str.replace(/function FM\(\)[ ]?\{/gms, "function FM() {%DMXVARS%\n")} #else const char PAGE_dmxmap[] PROGMEM = R"=====()====="; diff --git a/wled00/cfg.cpp b/wled00/cfg.cpp index bb2c9476..22b24886 100644 --- a/wled00/cfg.cpp +++ b/wled00/cfg.cpp @@ -607,7 +607,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) { getStringFromJson(otaPass, pwd, 33); //normally not present due to security } - #ifdef WLED_ENABLE_DMX + #ifdef WLED_ENABLE_DMX_OUTPUT JsonObject dmx = doc["dmx"]; CJSON(DMXChannels, dmx[F("chan")]); CJSON(DMXGap,dmx[F("gap")]); @@ -1070,7 +1070,7 @@ void serializeConfig() { ota[F("pskl")] = strlen(otaPass); ota[F("aota")] = aOtaEnabled; - #ifdef WLED_ENABLE_DMX + #ifdef WLED_ENABLE_DMX_OUTPUT JsonObject dmx = doc.createNestedObject("dmx"); dmx[F("chan")] = DMXChannels; dmx[F("gap")] = DMXGap; diff --git a/wled00/const.h b/wled00/const.h index 24095e3a..43018178 100644 --- a/wled00/const.h +++ b/wled00/const.h @@ -449,7 +449,7 @@ #endif #endif -#ifdef WLED_ENABLE_DMX +#ifdef WLED_ENABLE_DMX_OUTPUT #if (LEDPIN == 2) #undef LEDPIN #define LEDPIN 1 diff --git a/wled00/dmx.cpp b/wled00/dmx.cpp index ed5e3213..08a755b0 100644 --- a/wled00/dmx.cpp +++ b/wled00/dmx.cpp @@ -10,7 +10,7 @@ * https://github.com/sparkfun/SparkFunDMX */ -#ifdef WLED_ENABLE_DMX +#ifdef WLED_ENABLE_DMX_OUTPUT // WLEDMM: seems that DMX output triggers watchdog resets when compiling for IDF 4.4.x #ifdef ARDUINO_ARCH_ESP32 diff --git a/wled00/e131.cpp b/wled00/e131.cpp index 18c1e3cf..bfac39cc 100644 --- a/wled00/e131.cpp +++ b/wled00/e131.cpp @@ -115,7 +115,7 @@ void handleE131Packet(e131_packet_t* p, IPAddress clientIP, byte protocol){ } void handleDMXData(uint16_t uni, uint16_t dmxChannels, uint8_t* e131_data, uint8_t mde, uint8_t previousUniverses) { - #ifdef WLED_ENABLE_DMX + #ifdef WLED_ENABLE_DMX_OUTPUT // does not act on out-of-order packets yet if (e131ProxyUniverse > 0 && uni == e131ProxyUniverse) { for (uint16_t i = 1; i <= dmxChannels; i++) diff --git a/wled00/html_other.h b/wled00/html_other.h index 7a1a6007..c43a3c07 100644 --- a/wled00/html_other.h +++ b/wled00/html_other.h @@ -24,7 +24,7 @@ function B(){window.history.back()}function RS(){window.location="/settings"}fun

%MSG%)====="; -#ifdef WLED_ENABLE_DMX +#ifdef WLED_ENABLE_DMX_OUTPUT // Autogenerated from wled00/data/dmxmap.htm, do not edit!! const char PAGE_dmxmap[] PROGMEM = R"=====( diff --git a/wled00/pin_manager.cpp b/wled00/pin_manager.cpp index 1940f4ea..822bdcf3 100644 --- a/wled00/pin_manager.cpp +++ b/wled00/pin_manager.cpp @@ -185,7 +185,7 @@ String PinManagerClass::getPinSpecialText(int gpio) { // special purpose PIN in if (gpio == IRPIN) return(F("(default) IR receiver pin")); #endif - #ifdef WLED_ENABLE_DMX + #ifdef WLED_ENABLE_DMX_OUTPUT if (gpio == 2) return(F("hardcoded DMX output pin")); #endif diff --git a/wled00/set.cpp b/wled00/set.cpp index 263d7fb8..58cef200 100644 --- a/wled00/set.cpp +++ b/wled00/set.cpp @@ -540,7 +540,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage) } } - #ifdef WLED_ENABLE_DMX // include only if DMX is enabled + #ifdef WLED_ENABLE_DMX_OUTPUT // include only if DMX is enabled if (subPage == 7) { int t = request->arg(F("PU")).toInt(); diff --git a/wled00/wled.cpp b/wled00/wled.cpp index 02353637..7070b082 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -120,7 +120,7 @@ void WLED::loop() } #endif -#ifdef WLED_ENABLE_DMX +#ifdef WLED_ENABLE_DMX_OUTPUT handleDMX(); #endif #ifdef WLED_ENABLE_DMX_INPUT @@ -582,7 +582,7 @@ void WLED::setup() pinManager.manageDebugTXPin(); -#ifdef WLED_ENABLE_DMX //reserve GPIO2 as hardcoded DMX pin +#ifdef WLED_ENABLE_DMX_OUTPUT //reserve GPIO2 as hardcoded DMX pin pinManager.allocatePin(2, true, PinOwner::DMX); #endif @@ -704,7 +704,7 @@ void WLED::setup() ArduinoOTA.setHostname(cmDNS); } #endif -#ifdef WLED_ENABLE_DMX +#ifdef WLED_ENABLE_DMX_OUTPUT initDMX(); #endif #ifdef WLED_ENABLE_DMX_INPUT diff --git a/wled00/wled.h b/wled00/wled.h index 61692a1c..2a4d9fbd 100644 --- a/wled00/wled.h +++ b/wled00/wled.h @@ -35,7 +35,7 @@ #else #undef WLED_ENABLE_ADALIGHT // disable has priority over enable #endif -//#define WLED_ENABLE_DMX // uses 3.5kb (use LEDPIN other than 2) +//#define WLED_ENABLE_DMX_OUTPUT // uses 3.5kb (use LEDPIN other than 2) //#define WLED_ENABLE_DMX_INPUT // Listen for DMX over Serial //#define WLED_ENABLE_JSONLIVE // peek LED output via /json/live (WS binary peek is always enabled) #ifndef WLED_DISABLE_LOXONE @@ -136,7 +136,7 @@ #include "src/dependencies/espalexa/EspalexaDevice.h" #endif -#ifdef WLED_ENABLE_DMX +#ifdef WLED_ENABLE_DMX_OUTPUT #ifdef ESP8266 #include "src/dependencies/dmx/ESPDMX.h" #else //ESP32 @@ -415,7 +415,7 @@ WLED_GLOBAL bool receiveDirect _INIT(true); // receive UDP WLED_GLOBAL bool arlsDisableGammaCorrection _INIT(true); // activate if gamma correction is handled by the source WLED_GLOBAL bool arlsForceMaxBri _INIT(false); // enable to force max brightness if source has very dark colors that would be black -#ifdef WLED_ENABLE_DMX +#ifdef WLED_ENABLE_DMX_OUTPUT #ifdef ESP8266 WLED_GLOBAL DMXESPSerial dmx; #else //ESP32 @@ -520,7 +520,7 @@ WLED_GLOBAL unsigned long lastEditTime _INIT(0); WLED_GLOBAL uint16_t userVar0 _INIT(0), userVar1 _INIT(0); //available for use in usermod -#ifdef WLED_ENABLE_DMX +#ifdef WLED_ENABLE_DMX_OUTPUT // dmx CONFIG WLED_GLOBAL byte DMXChannels _INIT(7); // number of channels per fixture WLED_GLOBAL byte DMXFixtureMap[15] _INIT_N(({ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 })); diff --git a/wled00/wled_eeprom.cpp b/wled00/wled_eeprom.cpp index 7c5fd783..fc81b133 100644 --- a/wled00/wled_eeprom.cpp +++ b/wled00/wled_eeprom.cpp @@ -310,7 +310,7 @@ void loadSettingsFromEEPROM() e131Port = EEPROM.read(2187) + ((EEPROM.read(2188) << 8) & 0xFF00); } - #ifdef WLED_ENABLE_DMX + #ifdef WLED_ENABLE_DMX_OUTPUT if (lastEEPROMversion > 19) { e131ProxyUniverse = EEPROM.read(2185) + ((EEPROM.read(2186) << 8) & 0xFF00); @@ -339,7 +339,7 @@ void loadSettingsFromEEPROM() //custom macro memory (16 slots/ each 64byte) //1024-2047 reserved - #ifdef WLED_ENABLE_DMX + #ifdef WLED_ENABLE_DMX_OUTPUT // DMX (2530 - 2549)2535 DMXChannels = EEPROM.read(2530); DMXGap = EEPROM.read(2531) + ((EEPROM.read(2532) << 8) & 0xFF00); diff --git a/wled00/wled_server.cpp b/wled00/wled_server.cpp index 36283aa1..71ef63bb 100644 --- a/wled00/wled_server.cpp +++ b/wled00/wled_server.cpp @@ -361,7 +361,7 @@ void initServer() #endif - #ifdef WLED_ENABLE_DMX + #ifdef WLED_ENABLE_DMX_OUTPUT server.on("/dmxmap", HTTP_GET, [](AsyncWebServerRequest *request){ request->send_P(200, "text/html", PAGE_dmxmap , dmxProcessor); }); @@ -531,11 +531,11 @@ void serveMessage(AsyncWebServerRequest* request, uint16_t code, const String& h } -#ifdef WLED_ENABLE_DMX +#ifdef WLED_ENABLE_DMX_OUTPUT String dmxProcessor(const String& var) { String mapJS; - #ifdef WLED_ENABLE_DMX + #ifdef WLED_ENABLE_DMX_OUTPUT if (var == "DMXVARS") { mapJS += "\nCN=" + String(DMXChannels) + ";\n"; mapJS += "CS=" + String(DMXStart) + ";\n"; @@ -661,7 +661,7 @@ void serveSettings(AsyncWebServerRequest* request, bool post) case 4: response = request->beginResponse_P(200, "text/html", PAGE_settings_sync, PAGE_settings_sync_length); break; case 5: response = request->beginResponse_P(200, "text/html", PAGE_settings_time, PAGE_settings_time_length); break; case 6: response = request->beginResponse_P(200, "text/html", PAGE_settings_sec, PAGE_settings_sec_length); break; -#ifdef WLED_ENABLE_DMX +#ifdef WLED_ENABLE_DMX_OUTPUT case 7: response = request->beginResponse_P(200, "text/html", PAGE_settings_dmx, PAGE_settings_dmx_length); break; #endif case 8: response = request->beginResponse_P(200, "text/html", PAGE_settings_um, PAGE_settings_um_length); break; diff --git a/wled00/xml.cpp b/wled00/xml.cpp index 0eeb8ddd..17d890b4 100644 --- a/wled00/xml.cpp +++ b/wled00/xml.cpp @@ -213,7 +213,7 @@ void appendGPIOinfo() { // add reserved and usermod pins as d.um_p array oappend(rsvd); - #ifdef WLED_ENABLE_DMX + #ifdef WLED_ENABLE_DMX_OUTPUT oappend(SET_F(",2")); // DMX hardcoded pin #endif @@ -307,7 +307,7 @@ void getSettingsJS(AsyncWebServerRequest* request, byte subPage, char* dest) //W #ifndef WLED_DISABLE_2D // include only if 2D is compiled in oappend(PSTR("gId('2dbtn').style.display='';")); #endif - #ifdef WLED_ENABLE_DMX // include only if DMX is enabled + #ifdef WLED_ENABLE_DMX_OUTPUT // include only if DMX is enabled oappend(PSTR("gId('dmxbtn').style.display='';")); #endif } @@ -573,7 +573,7 @@ void getSettingsJS(AsyncWebServerRequest* request, byte subPage, char* dest) //W sappend('c',SET_F("ES"),e131SkipOutOfSequence); sappend('c',SET_F("EM"),e131Multicast); sappend('v',SET_F("EU"),e131Universe); -#ifdef WLED_ENABLE_DMX +#ifdef WLED_ENABLE_DMX_OUTPUT oappend(SET_F("hideNoDMX();")); // WLEDMM hide "not compiled in" message #endif #ifndef WLED_ENABLE_DMX_INPUT @@ -754,7 +754,7 @@ void getSettingsJS(AsyncWebServerRequest* request, byte subPage, char* dest) //W oappend(SET_F("\";")); } - #ifdef WLED_ENABLE_DMX // include only if DMX is enabled + #ifdef WLED_ENABLE_DMX_OUTPUT // include only if DMX is enabled if (subPage == 7) { sappend('v',SET_F("PU"),e131ProxyUniverse);