mirror of
https://github.com/meshtastic/firmware.git
synced 2025-07-30 02:15:41 +00:00
improve WiFi power saving configuration (stable in current sdk)
This commit is contained in:
parent
f1c1808449
commit
2d5b9297e3
@ -296,10 +296,12 @@ bool initWifi()
|
||||
#ifdef ARCH_ESP32
|
||||
WiFi.onEvent(WiFiEvent);
|
||||
WiFi.setAutoReconnect(true);
|
||||
WiFi.setSleep(false);
|
||||
|
||||
// This is needed to improve performance.
|
||||
esp_wifi_set_ps(WIFI_PS_NONE); // Disable radio power saving
|
||||
#ifdef WIFI_MAX_PERFORMANCE
|
||||
esp_wifi_set_ps(config.power.is_power_saving ? WIFI_PS_MIN_MODEM : WIFI_PS_NONE);
|
||||
#else
|
||||
esp_wifi_set_ps(config.power.is_power_saving ? WIFI_PS_MAX_MODEM : WIFI_PS_MIN_MODEM);
|
||||
#endif
|
||||
|
||||
WiFi.onEvent(
|
||||
[](WiFiEvent_t event, WiFiEventInfo_t info) {
|
||||
|
Loading…
Reference in New Issue
Block a user