Change rx data processing to ensure updateArmingStatus() is called periodically
There was an issue in that if no data from PPM or PWM rx inputs would result in processRx() exiting prematurely and updateArmingStatus() not being called. This affected processing of boot grace timeouts, cpu load arming disabled checking, etc. This change forces updates to occur no less frequently than 50Hz even if no data is available.
This commit is contained in:
parent
b0ff928afd
commit
42e8f63e2a
|
@ -421,14 +421,17 @@ bool rxUpdateCheck(timeUs_t currentTimeUs, timeDelta_t currentDeltaTime)
|
|||
rxIsInFailsafeMode = (frameStatus & RX_FRAME_FAILSAFE) != 0;
|
||||
rxSignalReceived = !rxIsInFailsafeMode;
|
||||
needRxSignalBefore = currentTimeUs + needRxSignalMaxDelayUs;
|
||||
} else if (cmpTimeUs(currentTimeUs, rxNextUpdateAtUs) > 0) {
|
||||
rxDataProcessingRequired = true;
|
||||
}
|
||||
|
||||
if (frameStatus & RX_FRAME_PROCESSING_REQUIRED) {
|
||||
auxiliaryProcessingRequired = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (cmpTimeUs(currentTimeUs, rxNextUpdateAtUs) > 0) {
|
||||
rxDataProcessingRequired = true;
|
||||
}
|
||||
|
||||
return rxDataProcessingRequired || auxiliaryProcessingRequired; // data driven or 50Hz
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue