mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-25 17:25:18 +03:00
Remove dead PWM/PPM-related code
This commit is contained in:
parent
1456e12979
commit
601d77c839
1 changed files with 9 additions and 29 deletions
|
@ -412,36 +412,16 @@ bool rxUpdateCheck(timeUs_t currentTimeUs, timeDelta_t currentDeltaTime)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#if defined(USE_PWM) || defined(USE_PPM)
|
const uint8_t frameStatus = rxRuntimeConfig.rcFrameStatusFn(&rxRuntimeConfig);
|
||||||
if (feature(FEATURE_RX_PPM)) {
|
if (frameStatus & RX_FRAME_COMPLETE) {
|
||||||
if (isPPMDataBeingReceived()) {
|
rxDataProcessingRequired = true;
|
||||||
rxDataProcessingRequired = true;
|
rxIsInFailsafeMode = (frameStatus & RX_FRAME_FAILSAFE) != 0;
|
||||||
rxSignalReceived = true;
|
rxSignalReceived = !rxIsInFailsafeMode;
|
||||||
rxIsInFailsafeMode = false;
|
needRxSignalBefore = currentTimeUs + rxRuntimeConfig.rxSignalTimeout;
|
||||||
needRxSignalBefore = currentTimeUs + rxRuntimeConfig.rxSignalTimeout;
|
}
|
||||||
resetPPMDataReceivedState();
|
|
||||||
}
|
|
||||||
} else if (feature(FEATURE_RX_PARALLEL_PWM)) {
|
|
||||||
if (isPWMDataBeingReceived()) {
|
|
||||||
rxDataProcessingRequired = true;
|
|
||||||
rxSignalReceived = true;
|
|
||||||
rxIsInFailsafeMode = false;
|
|
||||||
needRxSignalBefore = currentTimeUs + rxRuntimeConfig.rxSignalTimeout;
|
|
||||||
}
|
|
||||||
} else
|
|
||||||
#endif
|
|
||||||
{
|
|
||||||
const uint8_t frameStatus = rxRuntimeConfig.rcFrameStatusFn(&rxRuntimeConfig);
|
|
||||||
if (frameStatus & RX_FRAME_COMPLETE) {
|
|
||||||
rxDataProcessingRequired = true;
|
|
||||||
rxIsInFailsafeMode = (frameStatus & RX_FRAME_FAILSAFE) != 0;
|
|
||||||
rxSignalReceived = !rxIsInFailsafeMode;
|
|
||||||
needRxSignalBefore = currentTimeUs + rxRuntimeConfig.rxSignalTimeout;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (frameStatus & RX_FRAME_PROCESSING_REQUIRED) {
|
if (frameStatus & RX_FRAME_PROCESSING_REQUIRED) {
|
||||||
auxiliaryProcessingRequired = true;
|
auxiliaryProcessingRequired = true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (cmpTimeUs(currentTimeUs, rxNextUpdateAtUs) > 0) {
|
if (cmpTimeUs(currentTimeUs, rxNextUpdateAtUs) > 0) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue