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

Cleaned up 'taskUpdateRxMain'. (#9073)

Cleaned up 'taskUpdateRxMain'.
This commit is contained in:
Michael Keller 2019-10-22 11:27:51 +13:00 committed by GitHub
commit e853636080
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -160,11 +160,12 @@ static void taskUpdateAccelerometer(timeUs_t currentTimeUs)
static void taskUpdateRxMain(timeUs_t currentTimeUs)
{
static timeUs_t lastRxTimeUs;
if (!processRx(currentTimeUs)) {
return;
}
static timeUs_t lastRxTimeUs;
currentRxRefreshRate = constrain(currentTimeUs - lastRxTimeUs, 1000, 30000);
lastRxTimeUs = currentTimeUs;
isRXDataNew = true;