mirror of
https://github.com/alexandrebobkov/ESP-Nodes.git
synced 2025-08-08 09:16:08 +00:00
RC Calibration
This commit is contained in:
@@ -33,6 +33,25 @@ void wifi_init()
|
|||||||
#if CONFIG_ESPNOW_ENABLE_LONG_RANGE
|
#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) );
|
ESP_ERROR_CHECK( esp_wifi_set_protocol(ESPNOW_WIFI_IF, WIFI_PROTOCOL_11B|WIFI_PROTOCOL_11G|WIFI_PROTOCOL_11N|WIFI_PROTOCOL_LR) );
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/*
|
||||||
|
* WI-FI
|
||||||
|
*/
|
||||||
|
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(WIFI_MODE_STA));//ESPNOW_WIFI_MODE));
|
||||||
|
wifi_config_t wifi_config = {
|
||||||
|
.sta = {
|
||||||
|
.ssid = WIFI_SSID,
|
||||||
|
.password = WIFI_PASSWORD,
|
||||||
|
},
|
||||||
|
};
|
||||||
|
ESP_ERROR_CHECK (esp_wifi_set_config(WIFI_IF_STA, &wifi_config));
|
||||||
|
ESP_ERROR_CHECK( esp_wifi_start());
|
||||||
|
ESP_ERROR_CHECK( esp_wifi_connect());
|
||||||
}
|
}
|
||||||
|
|
||||||
void transmission_init() {
|
void transmission_init() {
|
||||||
|
Reference in New Issue
Block a user