Make dual ant a sdkconfig setting

This commit is contained in:
feedc0de committed 2022-05-06 18:36:44 +02:00
1 parent f836ceb9c8
commit 63628ce68d
4 files changed
+10 -1

No files matched your search

-1
View File
@@ -13,7 +13,6 @@ set(sources
)
set(dependencies
arduino-esp32
esp_common
esp_netif
lwip
+4
View File
@@ -36,4 +36,8 @@ config LOG_LOCAL_LEVEL_WIFI_STACK
default 4 if LOG_LOCAL_LEVEL_WIFI_STACK_DEBUG
default 5 if LOG_LOCAL_LEVEL_WIFI_STACK_VERBOSE
config WIFI_DUAL_ANT
bool "Enable dual antenna functionality"
default false
endmenu
+2
View File
@@ -341,6 +341,7 @@ void init(const config &config)
ESP_LOGE(TAG, "wifi_set_ap_config() failed with %s", esp_err_to_name(result));
}
#ifdef CONFIG_WIFI_DUAL_ANT
if (config.dual_ant)
{
{
@@ -368,6 +369,7 @@ void init(const config &config)
ESP_LOGE(TAG, "esp_wifi_set_ant() failed with %s", esp_err_to_name(result));
}
}
#endif
last_ap_config = config.ap;
+4
View File
@@ -132,11 +132,13 @@ struct sta_scan_config
}
};
#ifdef CONFIG_WIFI_DUAL_ANT
struct dual_ant_config
{
gpio_num_t selectPin0{GPIO_NUM_2};
gpio_num_t selectPin1{GPIO_NUM_25};
};
#endif
struct sta_config
{
@@ -236,7 +238,9 @@ struct eth_config
struct config
{
std::optional<mac_t> base_mac_override;
#ifdef CONFIG_WIFI_DUAL_ANT
std::optional<dual_ant_config> dual_ant;
#endif
std::optional<sta_config> sta;
std::optional<ap_config> ap;
#ifdef CONFIG_ETH_ENABLED