new build flag WLEDMM_WIFI_POWERON_HACK

This ensures that WiFi gets powered ON (useful for boards with small "RainSun" crystal Wi-Fi antenna)
This commit is contained in:
Frank
2023-01-19 17:50:10 +01:00
parent efd72f44d8
commit 8918271620
2 changed files with 5 additions and 2 deletions

View File

@@ -1113,6 +1113,7 @@ build_flags = ${common.build_flags} ${esp32.build_flagsV4} ${esp32c3.build_flags
; -DARDUINO_USB_CDC_ON_BOOT=1 ;; enable CDC USB -> needed for debugging over serial USB
-DARDUINO_USB_CDC_ON_BOOT=0 ;; disable CDC USB
-D SERVERNAME='"WLED-C3"'
;-D WLEDMM_WIFI_POWERON_HACK ;; use this _only_ if your device is not able to make a WiFI connection!
;-D WLED_DISABLE_INFRARED ;; save flash space
;-D WLED_DISABLE_ALEXA ;; save flash space
-D LEDPIN=8 ;; onboard neopixel 5x5 Matrix. Attach your own LEDs to GPIO 20

View File

@@ -784,8 +784,10 @@ void WLED::initConnection()
WiFi.begin(clientSSID, clientPass);
#ifdef ARDUINO_ARCH_ESP32
// WLEDMM - if your board has issues connecting to WiFi, try uncommenting this
// WiFi.setTxPower(WIFI_POWER_5dBm); // required for ESP32-C3FH4-RGB
#ifdef WLEDMM_WIFI_POWERON_HACK
// WLEDMM - if your board has issues connecting to WiFi, try this
WiFi.setTxPower(WIFI_POWER_5dBm); // required for ESP32-C3FH4-RGB
#endif
WiFi.setSleep(!noWifiSleep);
WiFi.setHostname(hostname);
#else