mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-16 21:05:35 +03:00
Update RX_MSP to support 18 channels. Fix MSP_SET_RAW_RC / channel
mapping problem.
This commit is contained in:
parent
1efe530ea3
commit
fd86014308
2 changed files with 14 additions and 4 deletions
|
@ -1145,10 +1145,16 @@ static bool processInCommand(void)
|
||||||
magHold = read16();
|
magHold = read16();
|
||||||
break;
|
break;
|
||||||
case MSP_SET_RAW_RC:
|
case MSP_SET_RAW_RC:
|
||||||
// FIXME need support for more than 8 channels
|
{
|
||||||
for (i = 0; i < 8; i++)
|
uint8_t channelCount = currentPort->dataSize / sizeof(uint16_t);
|
||||||
rcData[i] = read16();
|
if (channelCount > MAX_SUPPORTED_RC_CHANNEL_COUNT) {
|
||||||
rxMspFrameRecieve();
|
headSerialError(0);
|
||||||
|
} else {
|
||||||
|
for (i = 0; i < channelCount; i++)
|
||||||
|
rcData[i] = read16();
|
||||||
|
rxMspFrameRecieve();
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
case MSP_SET_ACC_TRIM:
|
case MSP_SET_ACC_TRIM:
|
||||||
currentProfile->accelerometerTrims.values.pitch = read16();
|
currentProfile->accelerometerTrims.values.pitch = read16();
|
||||||
|
|
|
@ -265,6 +265,10 @@ void processRxChannels(void)
|
||||||
{
|
{
|
||||||
uint8_t chan;
|
uint8_t chan;
|
||||||
|
|
||||||
|
if (feature(FEATURE_RX_MSP)) {
|
||||||
|
return; // rcData will have already been updated by MSP_SET_RAW_RC
|
||||||
|
}
|
||||||
|
|
||||||
bool shouldCheckPulse = true;
|
bool shouldCheckPulse = true;
|
||||||
|
|
||||||
if (feature(FEATURE_FAILSAFE) && feature(FEATURE_RX_PPM)) {
|
if (feature(FEATURE_FAILSAFE) && feature(FEATURE_RX_PPM)) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue