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
1 changed files with 2 additions and 1 deletions

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;