mirror of
https://github.com/espressif/esp-idf
synced 2025-03-12 18:49:08 -04:00
Merge branch 'bugfix/fix_the_bug_in_espnow_example_v4.0' into 'release/v4.0'
espnow: fix the bug for calling esp_wifi_set_channel (backport v4.0) See merge request espressif/esp-idf!6692
This commit is contained in:
commit
065e386c57
@ -50,12 +50,6 @@ static void example_wifi_init(void)
|
||||
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) );
|
||||
|
||||
#if CONFIG_ESPNOW_ENABLE_LONG_RANGE
|
||||
ESP_ERROR_CHECK( esp_wifi_set_protocol(ESPNOW_WIFI_IF, WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_LR) );
|
||||
#endif
|
||||
|
Loading…
x
Reference in New Issue
Block a user