mirror of
https://github.com/iNavFlight/inav.git
synced 2025-07-26 01:35:35 +03:00
Merge pull request #1590 from ProDrone/safe_save_for_rxfail_values
MSP_SET_RXFAIL_CONFIG changed to allow more future RX channels
This commit is contained in:
commit
81a90dcb42
1 changed files with 6 additions and 10 deletions
|
@ -1633,16 +1633,12 @@ static bool processInCommand(void)
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case MSP_SET_RXFAIL_CONFIG:
|
case MSP_SET_RXFAIL_CONFIG:
|
||||||
{
|
i = read8();
|
||||||
uint8_t channelCount = currentPort->dataSize / 3;
|
if (i < MAX_SUPPORTED_RC_CHANNEL_COUNT) {
|
||||||
if (channelCount > MAX_SUPPORTED_RC_CHANNEL_COUNT) {
|
masterConfig.rxConfig.failsafe_channel_configurations[i].mode = read8();
|
||||||
headSerialError(0);
|
masterConfig.rxConfig.failsafe_channel_configurations[i].step = CHANNEL_VALUE_TO_RXFAIL_STEP(read16());
|
||||||
} else {
|
} else {
|
||||||
for (i = 0; i < channelCount; i++) {
|
headSerialError(0);
|
||||||
masterConfig.rxConfig.failsafe_channel_configurations[i].mode = read8();
|
|
||||||
masterConfig.rxConfig.failsafe_channel_configurations[i].step = CHANNEL_VALUE_TO_RXFAIL_STEP(read16());
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue