1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-24 08:45:36 +03:00

Added abillity to specify USART6 as default port.

This fixes the mismatch between identifier and index when uarts are actually missing and not defined.
This commit is contained in:
blckmn 2016-11-11 17:19:43 +11:00
parent e82e4465f1
commit 0ebaef175e
4 changed files with 19 additions and 3 deletions

View file

@ -724,7 +724,10 @@ void createDefaultConfig(master_t *config)
#ifdef SERIALRX_UART
if (featureConfigured(FEATURE_RX_SERIAL)) {
config->serialConfig.portConfigs[SERIALRX_UART].functionMask = FUNCTION_RX_SERIAL;
int serialIndex = findSerialPortIndexByIdentifier(SERIALRX_UART);
if (serialIndex >= 0) {
config->serialConfig.portConfigs[serialIndex].functionMask = FUNCTION_RX_SERIAL;
}
}
#endif