diff --git a/src/hal/src/radiolink.c b/src/hal/src/radiolink.c index 3b2dc3e9f8..772cf55713 100644 --- a/src/hal/src/radiolink.c +++ b/src/hal/src/radiolink.c @@ -159,7 +159,8 @@ void radiolinkSyslinkDispatch(SyslinkPacket *slp) if (slp->type == SYSLINK_RADIO_RAW) { slp->length--; // Decrease to get CRTP size. - xQueueSend(crtpPacketDelivery, &slp->length, 0); + // Block, since we should never drop a packet + xQueueSend(crtpPacketDelivery, &slp->length, portMAX_DELAY); ledseqRun(&seq_linkUp); // If a radio packet is received, one can be sent if (xQueueReceive(txQueue, &txPacket, 0) == pdTRUE) @@ -170,6 +171,7 @@ void radiolinkSyslinkDispatch(SyslinkPacket *slp) } else if (slp->type == SYSLINK_RADIO_RAW_BROADCAST) { slp->length--; // Decrease to get CRTP size. + // broadcasts are best effort, so no need to handle the case where the queue is full xQueueSend(crtpPacketDelivery, &slp->length, 0); ledseqRun(&seq_linkUp); // no ack for broadcasts diff --git a/src/modules/src/crtp.c b/src/modules/src/crtp.c index 9172a60798..63e671db8a 100644 --- a/src/modules/src/crtp.c +++ b/src/modules/src/crtp.c @@ -179,11 +179,8 @@ void crtpRxTask(void *param) { if (queues[p.port]) { - if (xQueueSend(queues[p.port], &p, 0) == errQUEUE_FULL) - { - // We should never drop packet - ASSERT(0); - } + // Block, since we should never drop a packet + xQueueSend(queues[p.port], &p, portMAX_DELAY); } if (callbacks[p.port])