Merge pull request #3487 from mikeller/fix_rx_init

Fixed channel count in 'rxInit'.
This commit is contained in:
Martin Budden 2017-07-10 13:55:01 +01:00 committed by GitHub
commit c448f0dae5
1 changed files with 2 additions and 1 deletions

View File

@ -290,7 +290,6 @@ void rxInit(void)
rxRuntimeConfig.rcFrameStatusFn = nullFrameStatus;
rcSampleIndex = 0;
needRxSignalMaxDelayUs = DELAY_10_HZ;
rxChannelCount = MIN(rxConfig()->max_aux_channel + NON_AUX_CHANNEL_COUNT, rxRuntimeConfig.channelCount);
for (int i = 0; i < MAX_SUPPORTED_RC_CHANNEL_COUNT; i++) {
rcData[i] = rxConfig()->midrc;
@ -350,6 +349,8 @@ void rxInit(void)
rxPwmInit(rxConfig(), &rxRuntimeConfig);
}
#endif
rxChannelCount = MIN(rxConfig()->max_aux_channel + NON_AUX_CHANNEL_COUNT, rxRuntimeConfig.channelCount);
}
bool rxIsReceivingSignal(void)