Skip to content

Commit 495cd69

Browse files
committed
keep registering callback in initConnection()
this might bring back the crash, or not
1 parent 13e9f60 commit 495cd69

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

platformio.ini

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1851,6 +1851,7 @@ build_unflags = ${esp32_4MB_V4_M_base.build_unflags}
18511851
-D USERMOD_GAMES ; WLEDMM usermod
18521852
${common_mm.animartrix_build_flags}
18531853
${common_mm.HUB75_build_flags}
1854+
-D WLED_DEBUG_HOST='"192.168.x.x"' ;; to disable net print
18541855
;; more debug output
18551856
-DCORE_DEBUG_LEVEL=0
18561857
-DNDEBUG
@@ -1865,6 +1866,7 @@ build_flags = ${esp32_4MB_V4_M_base.build_flags}
18651866
-D WLED_DISABLE_BROWNOUT_DET -D WLED_WATCHDOG_TIMEOUT=0
18661867
-D WLED_USE_ETHERNET
18671868
-D WLED_DISABLE_ESPNOW ;; ESP-NOW requires wifi, may crash with ethernet only
1869+
-D WLED_DISABLE_OTA
18681870
-D CONFIG_ETH_USE_OPENETH=y ;; enable open_eth support
18691871
-D WLED_ETH_DEFAULT=2 ;; ESP32-POE board configuration (works with QEMU open_eth)
18701872
-D WLED_QEMU ;; Skip ethernet hardware initialization for QEMU compatibility

wled00/wled.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1143,6 +1143,8 @@ void WLED::initConnection()
11431143
WiFi.disconnect(true); // close old connections
11441144
#ifdef ESP8266
11451145
WiFi.setPhyMode(force802_3g ? WIFI_PHY_MODE_11G : WIFI_PHY_MODE_11N);
1146+
#endif
1147+
11461148
#endif
11471149

11481150
if (staticIP[0] != 0 && staticGateway[0] != 0) {
@@ -1153,6 +1155,8 @@ void WLED::initConnection()
11531155

11541156
lastReconnectAttempt = millis();
11551157

1158+
#ifndef WLED_QEMU
1159+
11561160
if (!WLED_WIFI_CONFIGURED) {
11571161
USER_PRINTLN(F("No WiFi connection configured.")); // WLEDMM
11581162
if (!apActive) initAP(); // instantly go to ap mode
@@ -1168,6 +1172,7 @@ void WLED::initConnection()
11681172
}
11691173
}
11701174
showWelcomePage = false;
1175+
#endif
11711176

11721177
USER_PRINT(F("Connecting to "));
11731178
USER_PRINT(clientSSID);
@@ -1185,6 +1190,7 @@ void WLED::initConnection()
11851190
WiFi.hostname(hostname);
11861191
#endif
11871192

1193+
#ifndef WLED_QEMU
11881194
WiFi.begin(clientSSID, clientPass);
11891195
#ifdef ARDUINO_ARCH_ESP32
11901196
#if defined(LOLIN_WIFI_FIX) && (defined(ARDUINO_ARCH_ESP32C3) || defined(ARDUINO_ARCH_ESP32S2) || defined(ARDUINO_ARCH_ESP32S3))

0 commit comments

Comments
 (0)