AP_RCTelemetry: add missing gate for AP_VIDEOTX_ENABLED

possible nullptr issue?
This commit is contained in:
Peter Barker 2024-08-07 20:16:28 +10:00 committed by Peter Barker
parent 92dd71203e
commit 5c3aa91721
1 changed files with 2 additions and 0 deletions

View File

@ -70,10 +70,12 @@ bool AP_CRSF_Telem::init(void)
return false;
}
#if AP_VIDEOTX_ENABLED
// Someone explicitly configure CRSF control for VTX
if (AP::serialmanager().have_serial(AP_SerialManager::SerialProtocol_CRSF, 0)) {
AP::vtx().set_provider_enabled(AP_VideoTX::VTXType::CRSF);
}
#endif
return AP_RCTelemetry::init();
}