Make dual ant a sdkconfig setting
This commit is contained in:
@@ -13,7 +13,6 @@ set(sources
|
|||||||
)
|
)
|
||||||
|
|
||||||
set(dependencies
|
set(dependencies
|
||||||
arduino-esp32
|
|
||||||
esp_common
|
esp_common
|
||||||
esp_netif
|
esp_netif
|
||||||
lwip
|
lwip
|
||||||
|
@@ -36,4 +36,8 @@ config LOG_LOCAL_LEVEL_WIFI_STACK
|
|||||||
default 4 if LOG_LOCAL_LEVEL_WIFI_STACK_DEBUG
|
default 4 if LOG_LOCAL_LEVEL_WIFI_STACK_DEBUG
|
||||||
default 5 if LOG_LOCAL_LEVEL_WIFI_STACK_VERBOSE
|
default 5 if LOG_LOCAL_LEVEL_WIFI_STACK_VERBOSE
|
||||||
|
|
||||||
|
config WIFI_DUAL_ANT
|
||||||
|
bool "Enable dual antenna functionality"
|
||||||
|
default false
|
||||||
|
|
||||||
endmenu
|
endmenu
|
||||||
|
@@ -341,6 +341,7 @@ void init(const config &config)
|
|||||||
ESP_LOGE(TAG, "wifi_set_ap_config() failed with %s", esp_err_to_name(result));
|
ESP_LOGE(TAG, "wifi_set_ap_config() failed with %s", esp_err_to_name(result));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef CONFIG_WIFI_DUAL_ANT
|
||||||
if (config.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));
|
ESP_LOGE(TAG, "esp_wifi_set_ant() failed with %s", esp_err_to_name(result));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
last_ap_config = config.ap;
|
last_ap_config = config.ap;
|
||||||
|
|
||||||
|
@@ -132,11 +132,13 @@ struct sta_scan_config
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef CONFIG_WIFI_DUAL_ANT
|
||||||
struct dual_ant_config
|
struct dual_ant_config
|
||||||
{
|
{
|
||||||
gpio_num_t selectPin0{GPIO_NUM_2};
|
gpio_num_t selectPin0{GPIO_NUM_2};
|
||||||
gpio_num_t selectPin1{GPIO_NUM_25};
|
gpio_num_t selectPin1{GPIO_NUM_25};
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
struct sta_config
|
struct sta_config
|
||||||
{
|
{
|
||||||
@@ -236,7 +238,9 @@ struct eth_config
|
|||||||
struct config
|
struct config
|
||||||
{
|
{
|
||||||
std::optional<mac_t> base_mac_override;
|
std::optional<mac_t> base_mac_override;
|
||||||
|
#ifdef CONFIG_WIFI_DUAL_ANT
|
||||||
std::optional<dual_ant_config> dual_ant;
|
std::optional<dual_ant_config> dual_ant;
|
||||||
|
#endif
|
||||||
std::optional<sta_config> sta;
|
std::optional<sta_config> sta;
|
||||||
std::optional<ap_config> ap;
|
std::optional<ap_config> ap;
|
||||||
#ifdef CONFIG_ETH_ENABLED
|
#ifdef CONFIG_ETH_ENABLED
|
||||||
|
Reference in New Issue
Block a user