Update RX_MSP to support 18 channels. Fix MSP_SET_RAW_RC / channel

mapping problem.
This commit is contained in:
Dominic Clifton 2015-01-08 06:43:35 +00:00
parent 1efe530ea3
commit fd86014308
2 changed files with 14 additions and 4 deletions

View File

@ -1145,10 +1145,16 @@ static bool processInCommand(void)
magHold = read16();
break;
case MSP_SET_RAW_RC:
// FIXME need support for more than 8 channels
for (i = 0; i < 8; i++)
rcData[i] = read16();
rxMspFrameRecieve();
{
uint8_t channelCount = currentPort->dataSize / sizeof(uint16_t);
if (channelCount > MAX_SUPPORTED_RC_CHANNEL_COUNT) {
headSerialError(0);
} else {
for (i = 0; i < channelCount; i++)
rcData[i] = read16();
rxMspFrameRecieve();
}
}
break;
case MSP_SET_ACC_TRIM:
currentProfile->accelerometerTrims.values.pitch = read16();

View File

@ -265,6 +265,10 @@ void processRxChannels(void)
{
uint8_t chan;
if (feature(FEATURE_RX_MSP)) {
return; // rcData will have already been updated by MSP_SET_RAW_RC
}
bool shouldCheckPulse = true;
if (feature(FEATURE_FAILSAFE) && feature(FEATURE_RX_PPM)) {