Ejemplo n.º 1
0
Archivo: rx.c Proyecto: oleost/inav
void calculateRxChannelsAndUpdateFailsafe(timeUs_t currentTimeUs)
{
    rxUpdateAt = currentTimeUs + DELAY_50_HZ;

    // only proceed when no more samples to skip and suspend period is over
    if (skipRxSamples) {
        if (currentTimeUs > suspendRxSignalUntil) {
            skipRxSamples--;
        }
        return;
    }

    readRxChannelsApplyRanges();
    detectAndApplySignalLossBehaviour();

    rcSampleIndex++;
}
Ejemplo n.º 2
0
void calculateRxChannelsAndUpdateFailsafe(uint32_t currentTime)
{
    rxUpdateAt = currentTime + DELAY_50_HZ;

    if (!feature(FEATURE_RX_MSP)) {
        // rcData will have already been updated by MSP_SET_RAW_RC

        if (!isRxDataDriven()) {
            processNonDataDrivenRx();
        }
    }

    // only proceed when no more samples to skip and suspend period is over
    if (skipRxSamples) {
        if (currentTime > suspendRxSignalUntil) {
            skipRxSamples--;
        }
        return;
    }

    readRxChannelsApplyRanges();
    detectAndApplySignalLossBehaviour();
}