1
0
Fork 0
mirror of https://github.com/betaflight/betaflight.git synced 2025-07-19 06:15:16 +03:00

Merge pull request #4185 from jflyper/bfdev-fix-rtc6705-optional-for-f4evo

F3EVO,F4EVO,F4NEO: Liberation from RTC6705 locked VTX feature.
This commit is contained in:
Martin Budden 2017-09-20 11:53:27 +01:00 committed by GitHub
commit 1370dbd070
3 changed files with 7 additions and 1 deletions

View file

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

View file

@ -78,6 +78,7 @@ typedef struct vtxVTable_s {
void vtxCommonInit(void); void vtxCommonInit(void);
void vtxCommonRegisterDevice(vtxDevice_t *pDevice); void vtxCommonRegisterDevice(vtxDevice_t *pDevice);
bool vtxCommonDeviceRegistered(void);
// VTable functions // VTable functions
void vtxCommonProcess(uint32_t currentTimeUs); void vtxCommonProcess(uint32_t currentTimeUs);

View file

@ -677,7 +677,7 @@ void init(void)
#endif #endif
#ifdef VTX_RTC6705 #ifdef VTX_RTC6705
#ifdef VTX_RTC6705OPTIONAL #ifdef VTX_RTC6705_OPTIONAL
if (!vtxCommonDeviceRegistered()) // external VTX takes precedence when configured. if (!vtxCommonDeviceRegistered()) // external VTX takes precedence when configured.
#endif #endif
{ {