From bd9ffbc8c768886c9b9f64ad59ab1f9cda4fb704 Mon Sep 17 00:00:00 2001 From: Shawn Nock Date: Thu, 18 Jul 2019 15:12:36 -0400 Subject: [PATCH] Logging --- src/main.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/main.c b/src/main.c index dd7d890..4acceb5 100644 --- a/src/main.c +++ b/src/main.c @@ -636,6 +636,7 @@ static void tx_thread(void) while ((buf = net_buf_get(&h5.controller_queue, K_MSEC(100)))) { bt_send(buf); } + LOG_DBG("controller_queue empty"); /* buf is dequeued from tx_queue and queued to unack * queue. @@ -907,7 +908,11 @@ void main(void) h5_init(); while (true) { - buf = net_buf_get(&h5.host_queue, K_FOREVER); + buf = net_buf_get(&h5.host_queue, K_MSEC(1000)); + if (!buf) { + LOG_WRN("host_queue is empty"); + continue; + } switch (h5.link_state) { case UNINIT: