1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-14 11:59:58 +03:00

Move telemetry displayport init and cms device registering

This commit is contained in:
Hans Christian Olaussen 2021-12-28 20:09:58 +01:00 committed by Hans Christian Olaussen
parent 8402d30c0d
commit cfa78b7b4f

View file

@ -878,12 +878,6 @@ void init(void)
cmsInit(); cmsInit();
#endif #endif
#ifdef USE_TELEMETRY
if (featureIsEnabled(FEATURE_TELEMETRY)) {
telemetryInit();
}
#endif
#if (defined(USE_OSD) || (defined(USE_MSP_DISPLAYPORT) && defined(USE_CMS))) #if (defined(USE_OSD) || (defined(USE_MSP_DISPLAYPORT) && defined(USE_CMS)))
displayPort_t *osdDisplayPort = NULL; displayPort_t *osdDisplayPort = NULL;
osdDisplayPortDevice_e osdDisplayPortDevice = OSD_DISPLAYPORT_DEVICE_NONE; osdDisplayPortDevice_e osdDisplayPortDevice = OSD_DISPLAYPORT_DEVICE_NONE;
@ -969,6 +963,13 @@ void init(void)
} }
#endif #endif
#ifdef USE_TELEMETRY
// Telemetry will initialise displayport and register with CMS by itself.
if (featureIsEnabled(FEATURE_TELEMETRY)) {
telemetryInit();
}
#endif
setArmingDisabled(ARMING_DISABLED_BOOT_GRACE_TIME); setArmingDisabled(ARMING_DISABLED_BOOT_GRACE_TIME);
// On F4/F7 allocate SPI DMA streams before motor timers // On F4/F7 allocate SPI DMA streams before motor timers