1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 00:35:39 +03:00

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)

This commit is contained in:
Andre Bernet 2015-04-26 18:16:40 +04:00
parent bbc6ba5c31
commit c41508fe6d

View file

@ -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
}
}
}