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.
pull/4495/head
Arne 2023-08-17 16:52:25 +02:00 zatwierdzone przez Will Tatam
rodzic 5a5661f136
commit aed03cd03b
1 zmienionych plików z 12 dodań i 0 usunięć

Wyświetl plik

@ -783,6 +783,9 @@ void WLED::initConnection()
{
DEBUG_PRINTF_P(PSTR("initConnection() called @ %lus.\n"), millis()/1000);
#ifdef WLED_ENABLE_DMX_INPUT
dmxInput.disable();
#endif
#ifdef WLED_ENABLE_WEBSOCKETS
ws.onEvent(wsEvent);
#endif
@ -811,6 +814,11 @@ void WLED::initConnection()
if (!WLED_WIFI_CONFIGURED) {
DEBUG_PRINTLN(F("No connection configured."));
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) {
DEBUG_PRINTLN(F("Access point ALWAYS enabled."));
@ -860,6 +868,10 @@ void WLED::initConnection()
statusESPNow = espNowOK ? ESP_NOW_STATE_ON : ESP_NOW_STATE_ERROR;
}
#endif
#ifdef WLED_ENABLE_DMX_INPUT
dmxInput.enable();
#endif
}
void WLED::initInterfaces()