1
0
Fork 0
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:
Dominic Clifton 2015-12-17 18:12:25 +01:00
commit 81a90dcb42

View file

@ -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;