From b270338a8fbb5f43acde6fc1a375c1ca5a81f521 Mon Sep 17 00:00:00 2001 From: Hays Chan <25737801+hayschan@users.noreply.github.com> Date: Thu, 30 May 2024 18:23:54 +0800 Subject: [PATCH] Fix compile issue --- main/esp32-ip-to-geolocation.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/main/esp32-ip-to-geolocation.c b/main/esp32-ip-to-geolocation.c index 1b6d943..434a115 100644 --- a/main/esp32-ip-to-geolocation.c +++ b/main/esp32-ip-to-geolocation.c @@ -5,7 +5,7 @@ EventGroupHandle_t s_wifi_event_group; const int WIFI_CONNECTED_BIT = BIT0; const int WIFI_FAIL_BIT = BIT1; -static void event_handler(void* arg, esp_event_base_t event_base, int32_t event_id, void* event_data) { +void event_handler(void* arg, esp_event_base_t event_base, int32_t event_id, void* event_data) { 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) { @@ -115,7 +115,6 @@ void http_get_task(void *pvParameters) { void app_main() { - nvs_flash_init(); wifi_init_sta(); xTaskCreate(&http_get_task, "http_get_task", 8192, NULL, 5, NULL); }