mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-26 01:35:41 +03:00
Cleaned up 'taskUpdateRxMain'.
This commit is contained in:
parent
564f3031b2
commit
6f124d0807
1 changed files with 2 additions and 1 deletions
|
@ -160,11 +160,12 @@ static void taskUpdateAccelerometer(timeUs_t currentTimeUs)
|
||||||
|
|
||||||
static void taskUpdateRxMain(timeUs_t currentTimeUs)
|
static void taskUpdateRxMain(timeUs_t currentTimeUs)
|
||||||
{
|
{
|
||||||
|
static timeUs_t lastRxTimeUs;
|
||||||
|
|
||||||
if (!processRx(currentTimeUs)) {
|
if (!processRx(currentTimeUs)) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
static timeUs_t lastRxTimeUs;
|
|
||||||
currentRxRefreshRate = constrain(currentTimeUs - lastRxTimeUs, 1000, 30000);
|
currentRxRefreshRate = constrain(currentTimeUs - lastRxTimeUs, 1000, 30000);
|
||||||
lastRxTimeUs = currentTimeUs;
|
lastRxTimeUs = currentTimeUs;
|
||||||
isRXDataNew = true;
|
isRXDataNew = true;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue