mirror of
https://bitbucket.org/librepilot/librepilot.git
synced 2024-12-01 09:24:10 +01:00
OP-1212 better wait on priority queue than std queue
This commit is contained in:
parent
a0baa17299
commit
8bdadaaff2
@ -376,13 +376,13 @@ static void telemetryTxTask(__attribute__((unused)) void *parameters)
|
||||
*/
|
||||
#if defined(PIOS_TELEM_PRIORITY_QUEUE)
|
||||
// Loop forever
|
||||
while (xQueueReceive(priorityQueue, &ev, 0) == pdTRUE) {
|
||||
while (xQueueReceive(priorityQueue, &ev, 1) == pdTRUE) {
|
||||
// Process event
|
||||
processObjEvent(&ev);
|
||||
}
|
||||
#endif
|
||||
// Wait for queue message
|
||||
if (xQueueReceive(queue, &ev, 1) == pdTRUE) {
|
||||
if (xQueueReceive(queue, &ev, 0) == pdTRUE) {
|
||||
// Process event
|
||||
processObjEvent(&ev);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user