Implemented country

This commit is contained in:
feedc0de committed 2021-11-01 23:22:58 +01:00
1 parent b447ce5de0
commit c07c900a1b
2 files changed
+5

No files matched your search

+4
View File
@@ -2055,6 +2055,10 @@ esp_err_t wifi_sync_mode(const config &config)
if (const auto result = esp_wifi_set_protocol(WIFI_IF_AP, WIFI_PROTOCOL_LR); result != ESP_OK)
ESP_LOGE(TAG, "esp_wifi_set_protocol() for AP long range failed with %s", esp_err_to_name(result));
if (config.country)
if (const auto result = esp_wifi_set_country(&*config.country); result != ESP_OK)
ESP_LOGE(TAG, "esp_wifi_set_country_code() failed with %s", esp_err_to_name(result));
if (const auto result = wifi_start(); result != ESP_OK)
{
ESP_LOGE(TAG, "wifi_start() failed with %s", esp_err_to_name(result));