Merge branch 'bugfix/fix_the_bug_in_espnow_example_v3.1' into 'release/v3.1'

espnow: fix the bug for calling esp_wifi_set_channel (backport v3.1)

See merge request espressif/esp-idf!6695
This commit is contained in:
Jiang Jiang Jian 2019-11-14 19:26:41 +08:00
commit a87e533ba8

View file

@ -61,12 +61,6 @@ static void example_wifi_init(void)
ESP_ERROR_CHECK( esp_wifi_set_storage(WIFI_STORAGE_RAM) );
ESP_ERROR_CHECK( esp_wifi_set_mode(ESPNOW_WIFI_MODE) );
ESP_ERROR_CHECK( esp_wifi_start());
/* In order to simplify example, channel is set after WiFi started.
* This is not necessary in real application if the two devices have
* been already on the same channel.
*/
ESP_ERROR_CHECK( esp_wifi_set_channel(CONFIG_ESPNOW_CHANNEL, 0) );
}
/* ESPNOW sending or receiving callback function is called in WiFi task.