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

Merge pull request #10584 from knoopx/fix-dp-msp-linking

fix: linking error when USE_MSP_DISPLAYPORT is undefined
This commit is contained in:
Michael Keller 2021-03-28 18:23:30 +13:00 committed by GitHub
commit 3a6b1a9ca4
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -599,6 +599,7 @@ static void validateAndFixConfig(void)
batteryConfigMutable()->vbatmaxcellvoltage = VBAT_CELL_VOLTAGE_DEFAULT_MAX;
}
#ifdef USE_MSP_DISPLAYPORT
// validate that displayport_msp_serial is referencing a valid UART that actually has MSP enabled
if (displayPortProfileMsp()->displayPortSerial != SERIAL_PORT_NONE) {
const serialPortConfig_t *portConfig = serialFindPortConfiguration(displayPortProfileMsp()->displayPortSerial);
@ -610,6 +611,7 @@ static void validateAndFixConfig(void)
displayPortProfileMspMutable()->displayPortSerial = SERIAL_PORT_NONE;
}
}
#endif
#if defined(TARGET_VALIDATECONFIG)
// This should be done at the end of the validation