properly discard messages with fromradio queue is full (Rather than blocking forever)

This commit is contained in:
Kevin Hester
2021-03-24 13:25:10 +08:00
parent 9a86d52d00
commit 78c665abb9
3 changed files with 30 additions and 21 deletions

View File

@@ -31,7 +31,9 @@ template <class T> class TypedQueue
bool isEmpty() { return uxQueueMessagesWaiting(h) == 0; }
bool enqueue(T x, TickType_t maxWait = portMAX_DELAY)
/** euqueue a packet. Also, maxWait used to default to portMAX_DELAY, but we now want to callers to THINK about what blocking
* they want */
bool enqueue(T x, TickType_t maxWait)
{
if (reader) {
reader->setInterval(0);