mirror of
https://github.com/alexhopeoconnor/WiFiManager.git
synced 2026-10-04 02:48:13 +10:00
#1125 remove country from 2.3.0
This commit is contained in:
+6
-3
@@ -2592,13 +2592,16 @@ void WiFiManager::DEBUG_WM(wm_debuglevel_t level,Generic text,Genericb textb) {
|
||||
* @return {[type]} [description]
|
||||
*/
|
||||
void WiFiManager::debugSoftAPConfig(){
|
||||
wifi_country_t country;
|
||||
|
||||
#ifdef ESP8266
|
||||
softap_config config;
|
||||
wifi_softap_get_config(&config);
|
||||
wifi_get_country(&country);
|
||||
#if !defined(WM_NOCOUNTRY)
|
||||
wifi_country_t country;
|
||||
wifi_get_country(&country);
|
||||
#endif
|
||||
#elif defined(ESP32)
|
||||
wifi_country_t country;
|
||||
wifi_config_t conf_config;
|
||||
esp_wifi_get_config(WIFI_IF_AP, &conf_config); // == ESP_OK
|
||||
wifi_ap_config_t config = conf_config.ap;
|
||||
@@ -2745,7 +2748,7 @@ bool WiFiManager::WiFiSetCountry(){
|
||||
else if(_wificountry == "CN") ret = esp_wifi_set_country(&WM_COUNTRY_CN) == ESP_OK;
|
||||
else DEBUG_WM(DEBUG_ERROR,"[ERROR] country code not found");
|
||||
|
||||
#elif defined(ESP8266)
|
||||
#elif defined(ESP8266) && !defined(WM_NOCOUNTRY)
|
||||
// if(WiFi.getMode() == WIFI_OFF); // exception if wifi not init!
|
||||
if(_wificountry == "US") ret = wifi_set_country((wifi_country_t*)&WM_COUNTRY_US);
|
||||
else if(_wificountry == "JP") ret = wifi_set_country((wifi_country_t*)&WM_COUNTRY_JP);
|
||||
|
||||
@@ -33,6 +33,7 @@
|
||||
#ifdef ARDUINO_ESP8266_RELEASE_2_3_0
|
||||
#warning "ARDUINO_ESP8266_RELEASE_2_3_0, some WM features disabled"
|
||||
#define WM_NOASYNC // esp8266 no async scan wifi
|
||||
#define WM_NOCOUNTRY // esp8266 no country
|
||||
#endif
|
||||
|
||||
// #include "soc/efuse_reg.h" // include to add efuse chip rev to info, getChipRevision() is almost always the same though, so not sure why it matters.
|
||||
|
||||
@@ -290,7 +290,7 @@ void getTime() {
|
||||
}
|
||||
Serial.println("");
|
||||
struct tm timeinfo;
|
||||
gmtime_r(&now, &timeinfo);
|
||||
gmtime_r(&now, &timeinfo); // @NOTE doesnt work in esp2.3.0
|
||||
Serial.print("Current time: ");
|
||||
Serial.print(asctime(&timeinfo));
|
||||
}
|
||||
|
||||
+1
-1
@@ -348,7 +348,7 @@ const char* const WIFI_MODES[] PROGMEM = { "NULL", "STA", "AP", "STA+AP" };
|
||||
const wifi_country_t WM_COUNTRY_US{"US",1,11,CONFIG_ESP32_PHY_MAX_TX_POWER,WIFI_COUNTRY_POLICY_AUTO};
|
||||
const wifi_country_t WM_COUNTRY_CN{"CN",1,13,CONFIG_ESP32_PHY_MAX_TX_POWER,WIFI_COUNTRY_POLICY_AUTO};
|
||||
const wifi_country_t WM_COUNTRY_JP{"JP",1,14,CONFIG_ESP32_PHY_MAX_TX_POWER,WIFI_COUNTRY_POLICY_AUTO};
|
||||
#elif defined(ESP8266)
|
||||
#elif defined(ESP8266) && !defined(WM_NOCOUNTRY)
|
||||
// typedef struct {
|
||||
// char cc[3]; /**< country code string */
|
||||
// uint8_t schan; /**< start channel */
|
||||
|
||||
Reference in New Issue
Block a user