From c41508fe6d8479af56bb4d83d1f3280f739eaa0b Mon Sep 17 00:00:00 2001 From: Andre Bernet Date: Sun, 26 Apr 2015 18:16:40 +0400 Subject: [PATCH] Loop through the smart port ID list locally (waiting for another main loop would cause the smart port request to time out and the slot would be lost) --- src/main/telemetry/smartport.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/telemetry/smartport.c b/src/main/telemetry/smartport.c index b2d91de102..e4ce868cc0 100644 --- a/src/main/telemetry/smartport.c +++ b/src/main/telemetry/smartport.c @@ -299,7 +299,7 @@ void handleSmartPortTelemetry(void) if ((now - smartPortLastServiceTime) < SMARTPORT_SERVICE_DELAY_MS) return; - if (smartPortHasRequest) { + while (smartPortHasRequest) { // we can send back any data we want, our table keeps track of the order and frequency of each data type we send uint16_t id = frSkyDataIdTable[smartPortIdCnt]; if (id == 0) { // end of table reached, loop back @@ -469,7 +469,7 @@ void handleSmartPortTelemetry(void) #endif default: break; - // if nothing is sent, smartPortHasRequest isn't cleared, we already incremented the counter, just wait for the next loop + // if nothing is sent, smartPortHasRequest isn't cleared, we already incremented the counter, just loop back to the start } } }