mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-18 09:48:52 +00:00
ESP-NOW Transmitter comments
This commit is contained in:
0
ESP32-IDF_ESPNOW-Transmitter/build/.ninja_lock
Normal file
0
ESP32-IDF_ESPNOW-Transmitter/build/.ninja_lock
Normal file
@@ -1 +1 @@
|
|||||||
5f32ff67769151f99b9e005cfb84dd4b839b4835
|
381423a9367875395da84aed0abbe5ef3bd970bd
|
||||||
|
@@ -65,20 +65,7 @@ static void joystick_task(void *arg);
|
|||||||
}
|
}
|
||||||
}*/
|
}*/
|
||||||
|
|
||||||
/* WiFi should start before using ESPNOW */
|
|
||||||
static void wifi_init() {
|
|
||||||
ESP_ERROR_CHECK(esp_netif_init());
|
|
||||||
ESP_ERROR_CHECK(esp_event_loop_create_default());
|
|
||||||
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
|
|
||||||
ESP_ERROR_CHECK( esp_wifi_init(&cfg) );
|
|
||||||
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());
|
|
||||||
ESP_ERROR_CHECK( esp_wifi_set_channel(CONFIG_ESPNOW_CHANNEL, WIFI_SECOND_CHAN_NONE));
|
|
||||||
#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
|
|
||||||
}
|
|
||||||
|
|
||||||
// Function to delete peer (i.e. when communication error occurs)
|
// Function to delete peer (i.e. when communication error occurs)
|
||||||
void deletePeer (void);/*{
|
void deletePeer (void);/*{
|
||||||
|
Reference in New Issue
Block a user