AP_RCTelemetry: add missing gate for AP_VIDEOTX_ENABLED
possible nullptr issue?
This commit is contained in:
parent
92dd71203e
commit
5c3aa91721
@ -70,10 +70,12 @@ bool AP_CRSF_Telem::init(void)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if AP_VIDEOTX_ENABLED
|
||||||
// Someone explicitly configure CRSF control for VTX
|
// Someone explicitly configure CRSF control for VTX
|
||||||
if (AP::serialmanager().have_serial(AP_SerialManager::SerialProtocol_CRSF, 0)) {
|
if (AP::serialmanager().have_serial(AP_SerialManager::SerialProtocol_CRSF, 0)) {
|
||||||
AP::vtx().set_provider_enabled(AP_VideoTX::VTXType::CRSF);
|
AP::vtx().set_provider_enabled(AP_VideoTX::VTXType::CRSF);
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
return AP_RCTelemetry::init();
|
return AP_RCTelemetry::init();
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user