fixing I2C requests and Wifi Power Saving Modes.

This commit is contained in:
Thomas Göttgens
2022-09-19 12:05:57 +02:00
parent 2d81d359b8
commit 4c6f3ead60
2 changed files with 8 additions and 2 deletions

View File

@@ -10,6 +10,7 @@
#include "target_specific.h"
#include <DNSServer.h>
#include <ESPmDNS.h>
#include <esp_wifi.h>
#include <WiFi.h>
#include <WiFiUdp.h>
@@ -239,7 +240,7 @@ bool initWifi(bool forceSoftAP)
DEBUG_MSG("MY IP AP ADDRESS: %s\n", WiFi.softAPIP().toString().c_str());
// This is needed to improve performance.
// esp_wifi_set_ps(WIFI_PS_NONE); // Disable radio power saving
esp_wifi_set_ps(WIFI_PS_NONE); // Disable radio power saving
dnsServer.start(53, "*", apIP);
@@ -253,7 +254,7 @@ bool initWifi(bool forceSoftAP)
WiFi.onEvent(WiFiEvent);
// This is needed to improve performance.
// esp_wifi_set_ps(WIFI_PS_NONE); // Disable radio power saving
esp_wifi_set_ps(WIFI_PS_NONE); // Disable radio power saving
WiFi.onEvent(
[](WiFiEvent_t event, WiFiEventInfo_t info) {