From 45fde1a28c93de0a1728e83df4c4ddf5de3ddef9 Mon Sep 17 00:00:00 2001 From: Brian Campuzano Date: Mon, 20 Feb 2017 23:41:59 -0800 Subject: [PATCH] Added wifi logger --- components/wifi/limbo_wifi.c | 7 +++++-- main/main.c | 3 +-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/components/wifi/limbo_wifi.c b/components/wifi/limbo_wifi.c index 87152df..9d860ad 100644 --- a/components/wifi/limbo_wifi.c +++ b/components/wifi/limbo_wifi.c @@ -1,12 +1,13 @@ -// ESP components #include "esp_wifi.h" #include "esp_event.h" #include "esp_event_loop.h" +#include "esp_log.h" -// Limbo components #include "limbo_wifi.h" #include "skynet.h" +static const char* TAG = "limbo_wifi"; + esp_err_t event_handler(void *ctx, system_event_t *event) { return ESP_OK; @@ -30,4 +31,6 @@ void limbo_wifi_init(void) ESP_ERROR_CHECK( esp_wifi_set_config(WIFI_IF_STA, &sta_config) ); ESP_ERROR_CHECK( esp_wifi_start() ); ESP_ERROR_CHECK( esp_wifi_connect() ); + + ESP_LOGI(TAG, "Completed wifi init"); } diff --git a/main/main.c b/main/main.c index 2cb6f07..6819a3a 100644 --- a/main/main.c +++ b/main/main.c @@ -1,10 +1,9 @@ -// ESP components #include "freertos/FreeRTOS.h" #include "freertos/task.h" + #include "esp_system.h" #include "nvs_flash.h" -// Limbo components #include "heartbeat.h" #include "limbo_wifi.h"