Remove baseband message from queue after it is processed.

Application code can now wait on queue empty and know the baseband's state.
This commit is contained in:
Jared Boone 2016-01-10 11:15:37 -08:00
parent 146caaab6f
commit d6f797540d

View File

@ -177,8 +177,9 @@ private:
void handle_baseband_queue() {
std::array<uint8_t, Message::MAX_SIZE> 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();
}
}