improve WiFi
This commit is contained in:
parent
873d63e6fa
commit
a43227fb47
5
.vscode/settings.json
vendored
5
.vscode/settings.json
vendored
@ -6,5 +6,8 @@
|
|||||||
"http_metrics.h": "c",
|
"http_metrics.h": "c",
|
||||||
"outputs.h": "c",
|
"outputs.h": "c",
|
||||||
"task.h": "c"
|
"task.h": "c"
|
||||||
}
|
},
|
||||||
|
"idf.openOcdConfigs": [
|
||||||
|
"board/esp32-wrover-kit-3.3v.cfg"
|
||||||
|
]
|
||||||
}
|
}
|
@ -201,8 +201,12 @@ void connect_wifi(void)
|
|||||||
};
|
};
|
||||||
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
|
ESP_ERROR_CHECK(esp_wifi_set_mode(WIFI_MODE_STA));
|
||||||
ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config));
|
ESP_ERROR_CHECK(esp_wifi_set_config(WIFI_IF_STA, &wifi_config));
|
||||||
|
|
||||||
ESP_ERROR_CHECK(esp_wifi_start());
|
ESP_ERROR_CHECK(esp_wifi_start());
|
||||||
|
|
||||||
|
ESP_ERROR_CHECK(esp_wifi_set_max_tx_power(78)); // Set max power to 19.5 dBm (78 in units of 0.25 dBm)
|
||||||
|
ESP_ERROR_CHECK(esp_wifi_set_ps(WIFI_PS_MIN_MODEM)); // Use power-saving mode
|
||||||
|
|
||||||
ESP_LOGI(TAG, "wifi_init_sta finished.");
|
ESP_LOGI(TAG, "wifi_init_sta finished.");
|
||||||
|
|
||||||
EventBits_t bits = xEventGroupWaitBits(s_wifi_event_group,
|
EventBits_t bits = xEventGroupWaitBits(s_wifi_event_group,
|
||||||
|
Loading…
Reference in New Issue
Block a user