diff --git a/src/main/drivers/vtx_common.c b/src/main/drivers/vtx_common.c index fff7fcab6b..b58121487d 100644 --- a/src/main/drivers/vtx_common.c +++ b/src/main/drivers/vtx_common.c @@ -42,6 +42,11 @@ void vtxCommonRegisterDevice(vtxDevice_t *pDevice) vtxDevice = pDevice; } +bool vtxCommonDeviceRegistered(void) +{ + return vtxDevice; +} + void vtxCommonProcess(uint32_t currentTimeUs) { if (!vtxDevice) diff --git a/src/main/drivers/vtx_common.h b/src/main/drivers/vtx_common.h index 000859ccab..fc74f130d8 100644 --- a/src/main/drivers/vtx_common.h +++ b/src/main/drivers/vtx_common.h @@ -78,6 +78,7 @@ typedef struct vtxVTable_s { void vtxCommonInit(void); void vtxCommonRegisterDevice(vtxDevice_t *pDevice); +bool vtxCommonDeviceRegistered(void); // VTable functions void vtxCommonProcess(uint32_t currentTimeUs); diff --git a/src/main/fc/fc_init.c b/src/main/fc/fc_init.c index 27c4c56c57..9edd9cc452 100644 --- a/src/main/fc/fc_init.c +++ b/src/main/fc/fc_init.c @@ -677,7 +677,7 @@ void init(void) #endif #ifdef VTX_RTC6705 -#ifdef VTX_RTC6705OPTIONAL +#ifdef VTX_RTC6705_OPTIONAL if (!vtxCommonDeviceRegistered()) // external VTX takes precedence when configured. #endif {