AP_OSD: correct compilation when GCS library not available

This commit is contained in:
Peter Barker 2023-12-08 13:10:38 +11:00 committed by Andrew Tridgell
parent 6efc6d0f2d
commit dd6d1f04c2
1 changed files with 2 additions and 2 deletions

View File

@ -39,12 +39,12 @@ bool AP_OSD_MSP_DisplayPort::init(void)
// check if we have a DisplayPort backend to use // check if we have a DisplayPort backend to use
const AP_MSP *msp = AP::msp(); const AP_MSP *msp = AP::msp();
if (msp == nullptr) { if (msp == nullptr) {
gcs().send_text(MAV_SEVERITY_WARNING,"MSP backend not available"); GCS_SEND_TEXT(MAV_SEVERITY_WARNING,"MSP backend not available");
return false; return false;
} }
_displayport = msp->find_protocol(AP_SerialManager::SerialProtocol_MSP_DisplayPort); _displayport = msp->find_protocol(AP_SerialManager::SerialProtocol_MSP_DisplayPort);
if (_displayport == nullptr) { if (_displayport == nullptr) {
gcs().send_text(MAV_SEVERITY_WARNING,"MSP DisplayPort uart not available"); GCS_SEND_TEXT(MAV_SEVERITY_WARNING,"MSP DisplayPort uart not available");
return false; return false;
} }
// re-init port here for use in this thread // re-init port here for use in this thread