Recover ESP8266 build and ESPWifiManualSetup

#563  Move protocol change method outside of wifimanager scope
and correct build error for ESP8266
This commit is contained in:
Florian committed 2020-04-08 15:14:14 -05:00
1 parent 0d486633ed
commit 26501b2176
2 files changed
+22 -22

No files matched your search

+1 -1
View File
@@ -107,7 +107,6 @@ char mqtt_topic[mqtt_topic_max_size] = Base_Topic;
char gateway_name[parameters_size * 2] = Gateway_Name;
#if defined(ESP8266)||defined(ESP32)
#include "esp_wifi.h"
#define ATTEMPTS_BEFORE_BG 10 // Number of wifi connection attempts before going to BG protocol
#define ATTEMPTS_BEFORE_B 20 // Number of wifi connection attempts before going to B protocol
#endif
@@ -115,6 +114,7 @@ char gateway_name[parameters_size * 2] = Gateway_Name;
// WIFI mode, uncomment to force a wifi mode, if not uncommented the ESP will connect without a mode forced
// if there is a reconnection issue it will try to connect with G mode and if not working with B mode
#ifdef ESP32
#include "esp_wifi.h"
uint8_t wifiProtocol = 0; // default mode, automatic selection
//uint8_t wifiProtocol = WIFI_PROTOCOL_11B;
//uint8_t wifiProtocol = WIFI_PROTOCOL_11B | WIFI_PROTOCOL_11G; // can't have only one https://github.com/espressif/esp-idf/issues/702