Fixed warning.

This commit is contained in:
mikeller 2018-09-05 00:34:43 +12:00
parent 2ecfb1d183
commit 04379715cb
1 changed files with 2 additions and 0 deletions

View File

@ -405,6 +405,7 @@ bool rxUpdateCheck(timeUs_t currentTimeUs, timeDelta_t currentDeltaTime)
return rxDataProcessingRequired || auxiliaryProcessingRequired; // data driven or 50Hz return rxDataProcessingRequired || auxiliaryProcessingRequired; // data driven or 50Hz
} }
#if defined(USE_PWM) || defined(USE_PPM)
static uint16_t calculateChannelMovingAverage(uint8_t chan, uint16_t sample) static uint16_t calculateChannelMovingAverage(uint8_t chan, uint16_t sample)
{ {
static int16_t rcSamples[MAX_SUPPORTED_RX_PARALLEL_PWM_OR_PPM_CHANNEL_COUNT][PPM_AND_PWM_SAMPLE_COUNT]; static int16_t rcSamples[MAX_SUPPORTED_RX_PARALLEL_PWM_OR_PPM_CHANNEL_COUNT][PPM_AND_PWM_SAMPLE_COUNT];
@ -430,6 +431,7 @@ static uint16_t calculateChannelMovingAverage(uint8_t chan, uint16_t sample)
} }
return rcDataMean[chan] / PPM_AND_PWM_SAMPLE_COUNT; return rcDataMean[chan] / PPM_AND_PWM_SAMPLE_COUNT;
} }
#endif
static uint16_t getRxfailValue(uint8_t channel) static uint16_t getRxfailValue(uint8_t channel)
{ {