From d6f797540df9d289140c4110065cda3a3dc1e5e6 Mon Sep 17 00:00:00 2001 From: Jared Boone Date: Sun, 10 Jan 2016 11:15:37 -0800 Subject: [PATCH] Remove baseband message from queue after it is processed. Application code can now wait on queue empty and know the baseband's state. --- firmware/baseband/main.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/firmware/baseband/main.cpp b/firmware/baseband/main.cpp index 8a8852b5..d74dd148 100755 --- a/firmware/baseband/main.cpp +++ b/firmware/baseband/main.cpp @@ -177,8 +177,9 @@ private: void handle_baseband_queue() { std::array message_buffer; - while(Message* const message = shared_memory.baseband_queue.pop(message_buffer)) { + while(Message* const message = shared_memory.baseband_queue.peek(message_buffer)) { on_message(message); + shared_memory.baseband_queue.skip(); } }