1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-25 17:25:20 +03:00

Fix typo for VTX_RTC6705_OPTIONAL and add vtxCommonDeviceRegistered

This commit is contained in:
jflyper 2017-09-19 23:15:25 +09:00
parent b4edce40d3
commit 51aa8e8177
3 changed files with 7 additions and 1 deletions

View file

@ -42,6 +42,11 @@ void vtxCommonRegisterDevice(vtxDevice_t *pDevice)
vtxDevice = pDevice;
}
bool vtxCommonDeviceRegistered(void)
{
return vtxDevice;
}
void vtxCommonProcess(uint32_t currentTimeUs)
{
if (!vtxDevice)

View file

@ -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);

View file

@ -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
{