Skip to content

Commit

Permalink
Fix compilation issues with latest esp32 core git (1.0.5rc)
Browse files Browse the repository at this point in the history
  • Loading branch information
Luc committed Feb 21, 2021
1 parent ccd699f commit ecf48fe
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
6 changes: 3 additions & 3 deletions esp3d/config.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1132,9 +1132,9 @@ void CONFIG::print_config (tpipe output, bool plaintext, ESPResponseStream *esp
#ifdef ARDUINO_ARCH_ESP32
uint8_t PhyMode;
if (WiFi.getMode() == WIFI_STA) {
esp_wifi_get_protocol (ESP_IF_WIFI_STA, &PhyMode);
esp_wifi_get_protocol (WIFI_IF_STA, &PhyMode);
} else {
esp_wifi_get_protocol (ESP_IF_WIFI_AP, &PhyMode);
esp_wifi_get_protocol (WIFI_IF_AP, &PhyMode);
}
#else
WiFiPhyMode_t PhyMode = WiFi.getPhyMode();
Expand Down Expand Up @@ -1368,7 +1368,7 @@ void CONFIG::print_config (tpipe output, bool plaintext, ESPResponseStream *esp
#ifdef ARDUINO_ARCH_ESP32
wifi_ap_config_t apconfig;
wifi_config_t conf;
esp_wifi_get_config (ESP_IF_WIFI_AP, &conf);
esp_wifi_get_config (WIFI_IF_AP, &conf);
apconfig.ssid_hidden = conf.ap.ssid_hidden;
apconfig.authmode = conf.ap.authmode;
apconfig.max_connection = conf.ap.max_connection;
Expand Down
2 changes: 1 addition & 1 deletion esp3d/esp3d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ void Esp3D::begin(uint16_t startdelayms, uint16_t recoverydelayms)
#ifdef ARDUINO_ARCH_ESP8266
WiFi.setPhyMode (WIFI_PHY_MODE_11G);
#else
esp_wifi_set_protocol (ESP_IF_WIFI_AP, WIFI_PHY_MODE_11G);
esp_wifi_set_protocol (WIFI_IF_AP, WIFI_PHY_MODE_11G);
#endif
CONFIG::esp_restart();
}
Expand Down
8 changes: 4 additions & 4 deletions esp3d/wificonf.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -344,7 +344,7 @@ bool WIFI_CONFIG::Setup (bool force_ap)
//setup Soft AP
WiFi.mode (WIFI_AP);
#ifdef ARDUINO_ARCH_ESP32
esp_wifi_set_protocol (ESP_IF_WIFI_AP, bflag);
esp_wifi_set_protocol (WIFI_IF_AP, bflag);
#endif
wifi_config.WiFi_on = true;
delay (50);
Expand All @@ -363,7 +363,7 @@ bool WIFI_CONFIG::Setup (bool force_ap)
//get current config
#ifdef ARDUINO_ARCH_ESP32
wifi_config_t conf;
esp_wifi_get_config (ESP_IF_WIFI_AP, &conf);
esp_wifi_get_config (WIFI_IF_AP, &conf);
#else
struct softap_config apconfig;
wifi_softap_get_config (&apconfig);
Expand Down Expand Up @@ -400,7 +400,7 @@ bool WIFI_CONFIG::Setup (bool force_ap)
#ifdef ARDUINO_ARCH_ESP32
conf.ap.max_connection = DEFAULT_MAX_CONNECTIONS;
conf.ap.beacon_interval = DEFAULT_BEACON_INTERVAL;
if (esp_wifi_set_config (ESP_IF_WIFI_AP, &conf) != ESP_OK) {
if (esp_wifi_set_config (WIFI_IF_AP, &conf) != ESP_OK) {
ESPCOM::println (F ("Error Wifi AP!"), PRINTER_PIPE);
delay (1000);
}
Expand Down Expand Up @@ -469,7 +469,7 @@ bool WIFI_CONFIG::Setup (bool force_ap)
#ifdef ARDUINO_ARCH_ESP8266
WiFi.setPhyMode ( (WiFiPhyMode_t) bflag);
#else
esp_wifi_set_protocol (ESP_IF_WIFI_STA, bflag);
esp_wifi_set_protocol (WIFI_IF_STA, bflag);
#endif
if (strlen(pwd) > 0) {
WiFi.begin (sbuf, pwd);
Expand Down

0 comments on commit ecf48fe

Please sign in to comment.