Compare commits
1
Commits
f5e5ca63bd
..
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
30c2c8e196 |
+2
-1
@@ -22,7 +22,7 @@ void ygg_wifi_event_handler(void* arg, esp_event_base_t event_base,
|
||||
if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_START) {
|
||||
esp_wifi_connect();
|
||||
} else if (event_base == WIFI_EVENT && event_id == WIFI_EVENT_STA_DISCONNECTED) {
|
||||
if (s_retry_num < 5) {
|
||||
if (s_retry_num < 20) {
|
||||
esp_wifi_connect();
|
||||
s_retry_num++;
|
||||
ESP_LOGI(TAG, "Resuming connection to AP...");
|
||||
@@ -48,6 +48,7 @@ void ygg_wifi_init_sta(void)
|
||||
|
||||
wifi_init_config_t cfg = WIFI_INIT_CONFIG_DEFAULT();
|
||||
ESP_ERROR_CHECK(esp_wifi_init(&cfg));
|
||||
ESP_ERROR_CHECK(esp_wifi_set_ps(WIFI_PS_NONE));
|
||||
|
||||
esp_event_handler_instance_t instance_any_id;
|
||||
esp_event_handler_instance_t instance_got_ip;
|
||||
|
||||
Reference in New Issue
Block a user