1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-17 13:25:30 +03:00

Moved osdDisplayPortDevice_e osdDisplayPortDevice initialisation to within USE_OSD define.

This commit is contained in:
blckmn 2022-10-29 17:11:20 +11:00
parent d9d25ef84b
commit 192f2c6cc7

View file

@ -891,10 +891,11 @@ void init(void)
#if (defined(USE_OSD) || (defined(USE_MSP_DISPLAYPORT) && defined(USE_CMS)))
displayPort_t *osdDisplayPort = NULL;
osdDisplayPortDevice_e osdDisplayPortDevice = OSD_DISPLAYPORT_DEVICE_NONE;
#endif
#if defined(USE_OSD)
osdDisplayPortDevice_e osdDisplayPortDevice = OSD_DISPLAYPORT_DEVICE_NONE;
//The OSD need to be initialised after GYRO to avoid GYRO initialisation failure on some targets
if (featureIsEnabled(FEATURE_OSD)) {