Expose front() function in MeshPacketQueue

This commit is contained in:
GUVWAF
2022-04-20 19:58:52 +02:00
parent 9097475149
commit 616c7d7b0e
2 changed files with 12 additions and 0 deletions

View File

@@ -72,6 +72,16 @@ MeshPacket *MeshPacketQueue::dequeue()
return p;
}
MeshPacket *MeshPacketQueue::getFront()
{
if (empty()) {
return NULL;
}
auto *p = queue.front();
return p;
}
/** Attempt to find and remove a packet from this queue. Returns a pointer to the removed packet, or NULL if not found */
MeshPacket *MeshPacketQueue::remove(NodeNum from, PacketId id)
{