Fixed channel count in 'rxInit'.

This commit is contained in:
mikeller 2017-07-10 23:17:49 +12:00
parent a885184796
commit 78ebd362b8
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)