mirror of
https://github.com/eried/portapack-mayhem.git
synced 2024-10-01 01:26:06 -04:00
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:
parent
146caaab6f
commit
d6f797540d
@ -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();
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user