From c00de76cb951dcbd4b62dff6ec47ae100bde3887 Mon Sep 17 00:00:00 2001 From: Sergey Krukovski Date: Mon, 6 Mar 2017 21:31:09 +0100 Subject: [PATCH] KroozX target only commit --- src/main/fc/fc_init.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/src/main/fc/fc_init.c b/src/main/fc/fc_init.c index 4f42bb56c0..6748d79c7a 100644 --- a/src/main/fc/fc_init.c +++ b/src/main/fc/fc_init.c @@ -405,6 +405,18 @@ void init(void) } #endif +#ifdef OSD + if (feature(FEATURE_OSD)) { +#if defined(USE_MAX7456) + // if there is a max7456 chip for the OSD then use it, otherwise use MSP + displayPort_t *osdDisplayPort = max7456DisplayPortInit(vcdProfile()); +#elif defined(USE_MSP_DISPLAYPORT) + displayPort_t *osdDisplayPort = displayPortMspInit(); +#endif + osdInit(osdDisplayPort); + } +#endif + if (!sensorsAutodetect()) { // if gyro was not detected due to whatever reason, we give up now. failureMode(FAILURE_MISSING_ACC); @@ -449,18 +461,6 @@ void init(void) rxInit(); -#ifdef OSD - if (feature(FEATURE_OSD)) { -#if defined(USE_MAX7456) - // if there is a max7456 chip for the OSD then use it, otherwise use MSP - displayPort_t *osdDisplayPort = max7456DisplayPortInit(vcdProfile()); -#elif defined(USE_MSP_DISPLAYPORT) - displayPort_t *osdDisplayPort = displayPortMspInit(); -#endif - osdInit(osdDisplayPort); - } -#endif - #ifdef GPS if (feature(FEATURE_GPS)) { gpsInit();