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.
This commit is contained in:
Arne
2023-08-17 16:52:25 +02:00
parent cf52c31693
commit fe84a9ad8a

View File

@@ -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()