Compilation fixes for ESP32-S2

This commit is contained in:
Luc 2021-02-05 19:04:16 +01:00
parent 3665f6c31f
commit d90c172001
2 changed files with 6 additions and 5 deletions

View File

@ -22,7 +22,7 @@
#define _VERSION_ESP3D_H
//version and sources location
#define FW_VERSION "3.0.0.a89"
#define FW_VERSION "3.0.0.a90"
#define REPOSITORY "https://github.com/luc-github/ESP3D/tree/3.0"
#endif //_VERSION_ESP3D_H

View File

@ -236,6 +236,7 @@ bool WiFiConfig::StartAP()
if((WiFi.getMode() == WIFI_AP) || (WiFi.getMode() == WIFI_AP_STA)) {
WiFi.softAPdisconnect();
}
WiFi.enableAP (true);
WiFi.enableSTA (false);
WiFi.mode(WIFI_AP);
//Set Sleep Mode to none
@ -375,7 +376,7 @@ const char* WiFiConfig::getPHYModeString (uint8_t wifimode)
{
#ifdef ARDUINO_ARCH_ESP32
uint8_t PhyMode;
esp_wifi_get_protocol ((wifimode == WIFI_STA)?ESP_IF_WIFI_STA:ESP_IF_WIFI_AP, &PhyMode);
esp_wifi_get_protocol ((wifi_interface_t)((wifimode == WIFI_STA)?ESP_IF_WIFI_STA:ESP_IF_WIFI_AP), &PhyMode);
#endif //ARDUINO_ARCH_ESP32
#ifdef ARDUINO_ARCH_ESP8266
(void)wifimode;
@ -396,7 +397,7 @@ bool WiFiConfig::is_AP_visible()
{
#ifdef ARDUINO_ARCH_ESP32
wifi_config_t conf;
esp_wifi_get_config (ESP_IF_WIFI_AP, &conf);
esp_wifi_get_config ((wifi_interface_t)ESP_IF_WIFI_AP, &conf);
return (conf.ap.ssid_hidden == 0);
#endif //ARDUINO_ARCH_ESP32
#ifdef ARDUINO_ARCH_ESP8266
@ -411,7 +412,7 @@ const char * WiFiConfig::AP_SSID()
static String ssid;
#ifdef ARDUINO_ARCH_ESP32
wifi_config_t conf;
esp_wifi_get_config (ESP_IF_WIFI_AP, &conf);
esp_wifi_get_config ((wifi_interface_t)ESP_IF_WIFI_AP, &conf);
ssid = (const char*) conf.ap.ssid;
#endif //ARDUINO_ARCH_ESP32
#ifdef ARDUINO_ARCH_ESP8266
@ -427,7 +428,7 @@ const char * WiFiConfig::AP_Auth_String()
uint8_t mode = 0;
#ifdef ARDUINO_ARCH_ESP32
wifi_config_t conf;
esp_wifi_get_config (ESP_IF_WIFI_AP, &conf);
esp_wifi_get_config ((wifi_interface_t)ESP_IF_WIFI_AP, &conf);
mode = conf.ap.authmode;
#endif //ARDUINO_ARCH_ESP32