From fe84a9ad8ae5376a8b4feb89761a1d1f1974f3ed Mon Sep 17 00:00:00 2001 From: Arne Date: Thu, 17 Aug 2023 16:52:25 +0200 Subject: [PATCH] hack: disable dmx receiver while wifi is being activated This fixes a crash in the dmx receiver. The dmx receiver cannot work while cache is disabled. For some reason activating wifi disables the cache. In theory, the driver is placed in iram and should work, but it doesn't. This might be a bug in the driver. --- wled00/wled.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/wled00/wled.cpp b/wled00/wled.cpp index 027796ba..319c210d 100644 --- a/wled00/wled.cpp +++ b/wled00/wled.cpp @@ -958,6 +958,9 @@ bool WLED::initEthernet() void WLED::initConnection() { + #ifdef WLED_ENABLE_DMX_INPUT + dmxInput.disable(); + #endif #ifdef WLED_ENABLE_WEBSOCKETS ws.onEvent(wsEvent); #endif @@ -978,6 +981,10 @@ void WLED::initConnection() if (!WLED_WIFI_CONFIGURED) { USER_PRINTLN(F("No WiFi connection configured.")); // WLEDMM if (!apActive) initAP(); // instantly go to ap mode + + #ifdef WLED_ENABLE_DMX_INPUT + dmxInput.enable(); + #endif return; } else if (!apActive) { if (apBehavior == AP_BEHAVIOR_ALWAYS) { @@ -1017,6 +1024,10 @@ void WLED::initConnection() #else wifi_set_sleep_type((noWifiSleep) ? NONE_SLEEP_T : MODEM_SLEEP_T); #endif + + #ifdef WLED_ENABLE_DMX_INPUT + dmxInput.enable(); + #endif } void WLED::initInterfaces()