Initialise OSD after GYRO

This commit is contained in:
Sergey Krukovski 2017-03-06 22:14:45 +01:00
parent 5b949596ee
commit 1857c7de73
1 changed files with 12 additions and 12 deletions

View File

@ -405,18 +405,6 @@ 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);
@ -459,6 +447,18 @@ 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();