- WiFi power for Lolin S2 & C3 (use -DLOLIN_WIFI_FIX)
- web response buffer size (corruption when websockets not used)
This commit is contained in:
Blaz Kristan 2023-04-30 17:30:36 +02:00
parent cc599f544a
commit 432c5837f0
3 changed files with 10 additions and 2 deletions

View File

@ -573,6 +573,9 @@ build_unflags = ${common.build_unflags} -DARDUINO_USB_CDC_ON_BOOT=1
build_flags = ${common.build_flags} ${esp32s2.build_flags} #-D WLED_RELEASE_NAME=LolinS2
-DBOARD_HAS_PSRAM
-DARDUINO_USB_CDC_ON_BOOT=0
-DARDUINO_USB_MSC_ON_BOOT=0
-DARDUINO_USB_DFU_ON_BOOT=0
-DLOLIN_WIFI_FIX ; seems to work much better with this
-D WLED_USE_PSRAM
-D WLED_WATCHDOG_TIMEOUT=0
-D CONFIG_ASYNC_TCP_USE_WDT=0

View File

@ -505,6 +505,9 @@ void WLED::initAP(bool resetAP)
DEBUG_PRINTLN(apSSID);
WiFi.softAPConfig(IPAddress(4, 3, 2, 1), IPAddress(4, 3, 2, 1), IPAddress(255, 255, 255, 0));
WiFi.softAP(apSSID, apPass, apChannel, apHide);
#if defined(LOLIN_WIFI_FIX) && (defined(ARDUINO_ARCH_ESP32C3) || defined(ARDUINO_ARCH_ESP32S2))
WiFi.setTxPower(WIFI_POWER_8_5dBm);
#endif
if (!apActive) // start captive portal if AP active
{
@ -662,8 +665,10 @@ void WLED::initConnection()
#endif
WiFi.begin(clientSSID, clientPass);
#ifdef ARDUINO_ARCH_ESP32
#if defined(LOLIN_WIFI_FIX) && (defined(ARDUINO_ARCH_ESP32C3) || defined(ARDUINO_ARCH_ESP32S2))
WiFi.setTxPower(WIFI_POWER_8_5dBm);
#endif
WiFi.setSleep(!noWifiSleep);
WiFi.setHostname(hostname);
#else

View File

@ -219,7 +219,7 @@ void initServer()
}
}
request->send(200, "application/json", F("{\"success\":true}"));
});
}, JSON_BUFFER_SIZE);
server.addHandler(handler);
server.on("/version", HTTP_GET, [](AsyncWebServerRequest *request){