Update to 16.8.1

This commit is contained in:
Proddy
2021-07-05 16:53:27 +02:00
parent 8429f650aa
commit 5b26e27834
2 changed files with 19 additions and 8 deletions

View File

@@ -19,6 +19,12 @@ NetworkSettingsService::NetworkSettingsService(AsyncWebServer * server, FS * fs,
WiFi.mode(WIFI_MODE_MAX); WiFi.mode(WIFI_MODE_MAX);
WiFi.mode(WIFI_MODE_NULL); WiFi.mode(WIFI_MODE_NULL);
#if defined(EMSESP_WIFI_TWEAK)
// https: //www.esp32.com/viewtopic.php?t=12055
esp_wifi_set_bandwidth(ESP_IF_WIFI_STA, WIFI_BW_HT20);
esp_wifi_set_bandwidth(ESP_IF_WIFI_AP, WIFI_BW_HT20);
#endif
WiFi.onEvent(std::bind(&NetworkSettingsService::WiFiEvent, this, _1)); WiFi.onEvent(std::bind(&NetworkSettingsService::WiFiEvent, this, _1));
addUpdateHandler([&](const String & originId) { reconfigureWiFiConnection(); }, false); addUpdateHandler([&](const String & originId) { reconfigureWiFiConnection(); }, false);

View File

@@ -6,7 +6,12 @@
#include <HttpEndpoint.h> #include <HttpEndpoint.h>
#include <JsonUtils.h> #include <JsonUtils.h>
#ifndef EMSESP_STANDALONE
#if defined(EMSESP_WIFI_TWEAK)
#include <esp_wifi.h>
#endif
#include <ETH.h> #include <ETH.h>
#endif
#define NETWORK_SETTINGS_FILE "/config/networkSettings.json" #define NETWORK_SETTINGS_FILE "/config/networkSettings.json"
#define NETWORK_SETTINGS_SERVICE_PATH "/rest/networkSettings" #define NETWORK_SETTINGS_SERVICE_PATH "/rest/networkSettings"