mirror of
https://github.com/wled/WLED.git
synced 2025-04-19 20:37:23 +00:00
Revert "Rename WLED_ENABLE_DMX to WLED_ENABLE_DMX_OUTPUT"
This reverts commit 7f9cc6751875dd4882f91bf58adcb820d76cab8c.
This commit is contained in:
parent
d637524bfc
commit
3996f02dea
@ -358,7 +358,7 @@ writeChunks(
|
||||
method: "plaintext",
|
||||
filter: "html-minify",
|
||||
mangle: (str) => `
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
${str.replace(/function FM\(\)[ ]?\{/gms, "function FM() {%DMXVARS%\n")}
|
||||
#else
|
||||
const char PAGE_dmxmap[] PROGMEM = R"=====()=====";
|
||||
|
@ -651,7 +651,7 @@ bool deserializeConfig(JsonObject doc, bool fromFS) {
|
||||
getStringFromJson(otaPass, pwd, 33); //normally not present due to security
|
||||
}
|
||||
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
JsonObject dmx = doc["dmx"];
|
||||
CJSON(DMXChannels, dmx[F("chan")]);
|
||||
CJSON(DMXGap,dmx[F("gap")]);
|
||||
@ -1116,8 +1116,8 @@ void serializeConfig() {
|
||||
ota[F("pskl")] = strlen(otaPass);
|
||||
ota[F("aota")] = aOtaEnabled;
|
||||
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
JsonObject dmx = doc.createNestedObject("dmx");
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
JsonObject dmx = root.createNestedObject("dmx");
|
||||
dmx[F("chan")] = DMXChannels;
|
||||
dmx[F("gap")] = DMXGap;
|
||||
dmx["start"] = DMXStart;
|
||||
|
@ -583,13 +583,6 @@
|
||||
#define DEFAULT_LED_COUNT 30
|
||||
|
||||
#define INTERFACE_UPDATE_COOLDOWN 1000 // time in ms to wait between websockets, alexa, and MQTT updates
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
#if (LEDPIN == 2)
|
||||
#undef LEDPIN
|
||||
#define LEDPIN 1
|
||||
#warning "Pin conflict compiling with DMX and LEDs on pin 2. The default LED pin has been changed to pin 1."
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#define PIN_RETRY_COOLDOWN 3000 // time in ms after an incorrect attempt PIN and OTA pass will be rejected even if correct
|
||||
#define PIN_TIMEOUT 900000 // time in ms after which the PIN will be required again, 15 minutes
|
||||
|
@ -10,7 +10,7 @@
|
||||
* https://github.com/sparkfun/SparkFunDMX
|
||||
*/
|
||||
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
|
||||
void handleDMXOutput()
|
||||
{
|
||||
|
@ -93,7 +93,7 @@ void handleE131Packet(e131_packet_t* p, IPAddress clientIP, byte protocol){
|
||||
return;
|
||||
}
|
||||
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
// does not act on out-of-order packets yet
|
||||
if (e131ProxyUniverse > 0 && uni == e131ProxyUniverse) {
|
||||
for (uint16_t i = 1; i <= dmxChannels; i++)
|
||||
|
@ -598,7 +598,7 @@ void handleSettingsSet(AsyncWebServerRequest *request, byte subPage)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT // include only if DMX is enabled
|
||||
#ifdef WLED_ENABLE_DMX // include only if DMX is enabled
|
||||
if (subPage == SUBPAGE_DMX)
|
||||
{
|
||||
int t = request->arg(F("PU")).toInt();
|
||||
|
@ -64,7 +64,7 @@ void WLED::loop()
|
||||
handleImprovWifiScan();
|
||||
handleNotifications();
|
||||
handleTransitions();
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
handleDMXOutput();
|
||||
#endif
|
||||
#ifdef WLED_ENABLE_DMX_INPUT
|
||||
@ -423,7 +423,7 @@ void WLED::setup()
|
||||
#if defined(WLED_DEBUG) && !defined(WLED_DEBUG_HOST)
|
||||
PinManager::allocatePin(hardwareTX, true, PinOwner::DebugOut); // TX (GPIO1 on ESP32) reserved for debug output
|
||||
#endif
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT //reserve GPIO2 as hardcoded DMX pin
|
||||
#ifdef WLED_ENABLE_DMX //reserve GPIO2 as hardcoded DMX pin
|
||||
PinManager::allocatePin(2, true, PinOwner::DMX);
|
||||
#endif
|
||||
|
||||
@ -526,7 +526,7 @@ void WLED::setup()
|
||||
ArduinoOTA.setHostname(cmDNS);
|
||||
}
|
||||
#endif
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
initDMXOutput();
|
||||
#endif
|
||||
#ifdef WLED_ENABLE_DMX_INPUT
|
||||
|
@ -34,8 +34,7 @@
|
||||
#else
|
||||
#undef WLED_ENABLE_ADALIGHT // disable has priority over enable
|
||||
#endif
|
||||
//#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_DMX // uses 3.5kb
|
||||
#ifndef WLED_DISABLE_LOXONE
|
||||
#define WLED_ENABLE_LOXONE // uses 1.2kb
|
||||
#endif
|
||||
@ -137,7 +136,7 @@
|
||||
#include "src/dependencies/espalexa/EspalexaDevice.h"
|
||||
#endif
|
||||
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
#if defined(ESP8266) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
#include "src/dependencies/dmx/ESPDMX.h"
|
||||
#else //ESP32
|
||||
@ -449,7 +448,7 @@ WLED_GLOBAL int arlsOffset _INIT(0); // realtime LE
|
||||
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_OUTPUT
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
#if defined(ESP8266) || defined(CONFIG_IDF_TARGET_ESP32C3) || defined(CONFIG_IDF_TARGET_ESP32S2)
|
||||
WLED_GLOBAL DMXESPSerial dmx;
|
||||
#else //ESP32
|
||||
|
@ -313,7 +313,7 @@ void loadSettingsFromEEPROM()
|
||||
e131Port = EEPROM.read(2187) + ((EEPROM.read(2188) << 8) & 0xFF00);
|
||||
}
|
||||
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
if (lastEEPROMversion > 19)
|
||||
{
|
||||
e131ProxyUniverse = EEPROM.read(2185) + ((EEPROM.read(2186) << 8) & 0xFF00);
|
||||
@ -342,7 +342,7 @@ void loadSettingsFromEEPROM()
|
||||
//custom macro memory (16 slots/ each 64byte)
|
||||
//1024-2047 reserved
|
||||
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
// DMX (2530 - 2549)2535
|
||||
DMXChannels = EEPROM.read(2530);
|
||||
DMXGap = EEPROM.read(2531) + ((EEPROM.read(2532) << 8) & 0xFF00);
|
||||
|
@ -96,7 +96,7 @@ static void handleStaticContent(AsyncWebServerRequest *request, const String &pa
|
||||
request->send(response);
|
||||
}
|
||||
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
static String dmxProcessor(const String& var)
|
||||
{
|
||||
String mapJS;
|
||||
@ -426,7 +426,7 @@ void initServer()
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
server.on(F("/dmxmap"), HTTP_GET, [](AsyncWebServerRequest *request){
|
||||
request->send_P(200, FPSTR(CONTENT_TYPE_HTML), PAGE_dmxmap , dmxProcessor);
|
||||
});
|
||||
@ -554,7 +554,7 @@ void serveSettings(AsyncWebServerRequest* request, bool post) {
|
||||
else if (url.indexOf( "sync") > 0) subPage = SUBPAGE_SYNC;
|
||||
else if (url.indexOf( "time") > 0) subPage = SUBPAGE_TIME;
|
||||
else if (url.indexOf(F("sec")) > 0) subPage = SUBPAGE_SEC;
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
else if (url.indexOf( "dmx") > 0) subPage = SUBPAGE_DMX;
|
||||
#endif
|
||||
else if (url.indexOf( "um") > 0) subPage = SUBPAGE_UM;
|
||||
@ -591,7 +591,7 @@ void serveSettings(AsyncWebServerRequest* request, bool post) {
|
||||
case SUBPAGE_SYNC : strcpy_P(s, PSTR("Sync")); break;
|
||||
case SUBPAGE_TIME : strcpy_P(s, PSTR("Time")); break;
|
||||
case SUBPAGE_SEC : strcpy_P(s, PSTR("Security")); if (doReboot) strcpy_P(s2, PSTR("Rebooting, please wait ~10 seconds...")); break;
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
case SUBPAGE_DMX : strcpy_P(s, PSTR("DMX")); break;
|
||||
#endif
|
||||
case SUBPAGE_UM : strcpy_P(s, PSTR("Usermods")); break;
|
||||
@ -626,7 +626,7 @@ void serveSettings(AsyncWebServerRequest* request, bool post) {
|
||||
case SUBPAGE_SYNC : content = PAGE_settings_sync; len = PAGE_settings_sync_length; break;
|
||||
case SUBPAGE_TIME : content = PAGE_settings_time; len = PAGE_settings_time_length; break;
|
||||
case SUBPAGE_SEC : content = PAGE_settings_sec; len = PAGE_settings_sec_length; break;
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
case SUBPAGE_DMX : content = PAGE_settings_dmx; len = PAGE_settings_dmx_length; break;
|
||||
#endif
|
||||
case SUBPAGE_UM : content = PAGE_settings_um; len = PAGE_settings_um_length; break;
|
||||
|
@ -100,7 +100,7 @@ void appendGPIOinfo(Print& settingsScript) {
|
||||
firstPin = false;
|
||||
}
|
||||
}
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
if (!firstPin) settingsScript.print(',');
|
||||
settingsScript.print(2); // DMX hardcoded pin
|
||||
firstPin = false;
|
||||
@ -164,7 +164,7 @@ void getSettingsJS(byte subPage, Print& settingsScript)
|
||||
#ifdef WLED_DISABLE_2D // include only if 2D is not compiled in
|
||||
settingsScript.print(F("gId('2dbtn').style.display='none';"));
|
||||
#endif
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT // include only if DMX is enabled
|
||||
#ifdef WLED_ENABLE_DMX // include only if DMX is enabled
|
||||
settingsScript.print(F("gId('dmxbtn').style.display='';"));
|
||||
#endif
|
||||
}
|
||||
@ -436,7 +436,7 @@ void getSettingsJS(byte subPage, Print& settingsScript)
|
||||
printSetFormCheckbox(settingsScript,PSTR("ES"),e131SkipOutOfSequence);
|
||||
printSetFormCheckbox(settingsScript,PSTR("EM"),e131Multicast);
|
||||
printSetFormValue(settingsScript,PSTR("EU"),e131Universe);
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT
|
||||
#ifdef WLED_ENABLE_DMX
|
||||
settingsScript.print(SET_F("hideNoDMX();")); // hide "not compiled in" message
|
||||
#endif
|
||||
#ifndef WLED_ENABLE_DMX_INPUT
|
||||
@ -596,7 +596,7 @@ void getSettingsJS(byte subPage, Print& settingsScript)
|
||||
settingsScript.printf_P(PSTR("sd=\"%s\";"), serverDescription);
|
||||
}
|
||||
|
||||
#ifdef WLED_ENABLE_DMX_OUTPUT // include only if DMX is enabled
|
||||
#ifdef WLED_ENABLE_DMX // include only if DMX is enabled
|
||||
if (subPage == SUBPAGE_DMX)
|
||||
{
|
||||
printSetFormValue(settingsScript,PSTR("PU"),e131ProxyUniverse);
|
||||
|
Loading…
x
Reference in New Issue
Block a user