From 192f2c6cc7f38935e183dc110612c23e73acc6cc Mon Sep 17 00:00:00 2001 From: blckmn Date: Sat, 29 Oct 2022 17:11:20 +1100 Subject: [PATCH] Moved osdDisplayPortDevice_e osdDisplayPortDevice initialisation to within USE_OSD define. --- src/main/fc/init.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/fc/init.c b/src/main/fc/init.c index e47bbe249..c08471b30 100644 --- a/src/main/fc/init.c +++ b/src/main/fc/init.c @@ -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)) { -- 2.11.4.GIT