From 3ce3b573a36aad2af83ad6ccd52dc8ec6176866f Mon Sep 17 00:00:00 2001 From: Geoffrey McRae Date: Mon, 12 Jul 2021 17:35:16 +1000 Subject: [PATCH] [host] app: fix infinate loop introduced in the last commit --- host/src/app.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/host/src/app.c b/host/src/app.c index 97c61e80..bd91b824 100644 --- a/host/src/app.c +++ b/host/src/app.c @@ -148,12 +148,12 @@ static bool sendFrame(void) bool repeatFrame = false; //wait until there is room in the queue - while(app.state == APP_STATE_RUNNING) - if(lgmpHostQueuePending(app.frameQueue) == LGMP_Q_FRAME_LEN) - { - usleep(1); - continue; - } + while(app.state == APP_STATE_RUNNING && + lgmpHostQueuePending(app.frameQueue) == LGMP_Q_FRAME_LEN) + { + usleep(1); + continue; + } if (app.state != APP_STATE_RUNNING) return false;