From e0e3bbd042b223bf3ca775662e50e239c8830e30 Mon Sep 17 00:00:00 2001 From: muhaidong Date: Mon, 27 Mar 2023 16:36:24 +0800 Subject: [PATCH] esp_wifi: the antenna parameter of example is not correct --- .../antenna/components/antenna_soft_switch/antenna_switch.c | 2 +- examples/wifi/antenna/main/antenna_switch_example_main.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/examples/wifi/antenna/components/antenna_soft_switch/antenna_switch.c b/examples/wifi/antenna/components/antenna_soft_switch/antenna_switch.c index e65e39ee07..4ff8dca023 100644 --- a/examples/wifi/antenna/components/antenna_soft_switch/antenna_switch.c +++ b/examples/wifi/antenna/components/antenna_soft_switch/antenna_switch.c @@ -34,7 +34,7 @@ static const char *TAG = "ANTENNA_SWITCH_EXAMPLE"; static wifi_antenna_auto_switch_config_t wifi_three_ant_auto_get_config = { - .ant_num = 3, + .ant_num = ANT_TOTAL_THREE, .ant_zero = 0, .ant_one = 1, .ant_two = 3, diff --git a/examples/wifi/antenna/main/antenna_switch_example_main.c b/examples/wifi/antenna/main/antenna_switch_example_main.c index 696fdb867a..af9e1ccd4f 100644 --- a/examples/wifi/antenna/main/antenna_switch_example_main.c +++ b/examples/wifi/antenna/main/antenna_switch_example_main.c @@ -175,7 +175,7 @@ void app_main(void) ESP_LOGI(TAG, "GPIO: [0].pin = %d, [1].pin = %d",ant_gpio_config.gpio_cfg[0].gpio_num, ant_gpio_config.gpio_cfg[1].gpio_num); wifi_antenna_auto_switch_config_t wifi_antenna_auto_switch_config; - wifi_antenna_auto_switch_config.ant_num = 3; + wifi_antenna_auto_switch_config.ant_num = ANT_TOTAL_THREE; wifi_antenna_auto_switch_config.ant_zero = 0; wifi_antenna_auto_switch_config.ant_one = 1; wifi_antenna_auto_switch_config.ant_two = 3;