Compare commits

..
1 Commits
Author SHA1 Message Date
mateusz 30c2c8e196 more retries 2026-10-23 11:37:46 +02:00
+2 -1
View File
@@ -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;