diff --git a/libraries/AP_Camera/AP_Camera_Mount.cpp b/libraries/AP_Camera/AP_Camera_Mount.cpp index f8968d3aa0f3a7..c3d8669194802e 100644 --- a/libraries/AP_Camera/AP_Camera_Mount.cpp +++ b/libraries/AP_Camera/AP_Camera_Mount.cpp @@ -73,10 +73,12 @@ bool AP_Camera_Mount::set_lens(uint8_t lens) // set_camera_source is functionally the same as set_lens except primary and secondary lenses are specified by type bool AP_Camera_Mount::set_camera_source(AP_Camera::CameraSource primary_source, AP_Camera::CameraSource secondary_source) { +#if HAL_MOUNT_SET_CAMERA_SOURCE_ENABLED AP_Mount* mount = AP::mount(); if (mount != nullptr) { return mount->set_camera_source(get_mount_instance(), (uint8_t)primary_source, (uint8_t)secondary_source); } +#endif return false; }