mirror of
https://github.com/wled/WLED.git
synced 2025-04-24 06:47:18 +00:00
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:
parent
5a5661f136
commit
aed03cd03b
@ -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()
|
||||
|
Loading…
x
Reference in New Issue
Block a user