From f3ae2f54a192110a4f64c3dbef2c36de93daae98 Mon Sep 17 00:00:00 2001 From: Sebastien Date: Mon, 30 Sep 2019 21:15:26 -0400 Subject: [PATCH] troubleshoot reboot-add traces to Wifi_Manager --- components/wifi-manager/wifi_manager.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/components/wifi-manager/wifi_manager.c b/components/wifi-manager/wifi_manager.c index 5a069d5a..72cb45df 100644 --- a/components/wifi-manager/wifi_manager.c +++ b/components/wifi-manager/wifi_manager.c @@ -524,21 +524,26 @@ char* wifi_manager_get_sta_ip_string(){ } bool wifi_manager_lock_json_buffer(TickType_t xTicksToWait){ + ESP_LOGD(TAG,"Locking json buffer"); if(wifi_manager_json_mutex){ if( xSemaphoreTake( wifi_manager_json_mutex, xTicksToWait ) == pdTRUE ) { + ESP_LOGD(TAG,"Json buffer locked!"); return true; } else{ + ESP_LOGD(TAG,"Semaphore take failed. Unable to lock json buffer mutex"); return false; } } else{ + ESP_LOGD(TAG,"Unable to lock json buffer mutex"); return false; } } void wifi_manager_unlock_json_buffer(){ + ESP_LOGD(TAG,"Unlocking json buffer!"); xSemaphoreGive( wifi_manager_json_mutex ); }