mirror of
https://github.com/betaflight/betaflight.git
synced 2025-07-24 16:55: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:
parent
e82e4465f1
commit
0ebaef175e
4 changed files with 19 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue