feat: migrate to arduino-esp32 core 3.0.1

This commit is contained in:
Yurii
2024-06-10 16:20:03 +03:00
parent 249d32ce35
commit ce7bd7e23b
8 changed files with 49 additions and 29 deletions

View File

@@ -147,10 +147,11 @@ namespace NetworkUtils {
bool resetWifi() {
// set policy manual for work 13 ch
{
wifi_country_t country = {"CN", 1, 13, WIFI_COUNTRY_POLICY_MANUAL};
#ifdef ARDUINO_ARCH_ESP8266
wifi_country_t country = {"CN", 1, 13, WIFI_COUNTRY_POLICY_AUTO};
wifi_set_country(&country);
#elif defined(ARDUINO_ARCH_ESP32)
const wifi_country_t country = {"CN", 1, 13, CONFIG_ESP32_PHY_MAX_WIFI_TX_POWER, WIFI_COUNTRY_POLICY_AUTO};
esp_wifi_set_country(&country);
#endif
}