From fb49e95064542f525ae450189520110adaa9f43e Mon Sep 17 00:00:00 2001 From: Morgan Allen Date: Fri, 21 Sep 2018 21:30:30 -0700 Subject: [PATCH] no longer reset from the loop, just announce the connection and sleep a while --- test/wm-test-project/main/main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/test/wm-test-project/main/main.c b/test/wm-test-project/main/main.c index f5f2cb8..58e7117 100644 --- a/test/wm-test-project/main/main.c +++ b/test/wm-test-project/main/main.c @@ -71,11 +71,13 @@ void loop(void *p) { while(true) { vTaskDelay(5000 / portTICK_PERIOD_MS); - ESP_LOGI(TAG, "resetting store"); + EventBits_t ev_bits = xEventGroupGetBits(wm_event_group); - wifi_manager_reset_store(); + if(ev_bits & WIFI_CONNECTED) { + vTaskDelay(5000 / portTICK_PERIOD_MS); - while(true) {}; + ESP_LOGI(TAG, "Got connection!"); + } } }