diff --git a/libraries/AP_Mount/AP_Mount_Topotek.cpp b/libraries/AP_Mount/AP_Mount_Topotek.cpp index e82a3f217cb6ce..56a20297c44682 100755 --- a/libraries/AP_Mount/AP_Mount_Topotek.cpp +++ b/libraries/AP_Mount/AP_Mount_Topotek.cpp @@ -464,6 +464,7 @@ bool AP_Mount_Topotek::set_lens(uint8_t lens) return send_fixedlen_packet(AddressByte::SYSTEM_AND_IMAGE, AP_MOUNT_TOPOTEK_ID3CHAR_PIP, true, lens); } +#if HAL_MOUNT_SET_CAMERA_SOURCE_ENABLED // set_camera_source is functionally the same as set_lens except primary and secondary lenses are specified by type // primary and secondary sources use the AP_Camera::CameraSource enum cast to uint8_t bool AP_Mount_Topotek::set_camera_source(uint8_t primary_source, uint8_t secondary_source) @@ -511,6 +512,7 @@ bool AP_Mount_Topotek::set_camera_source(uint8_t primary_source, uint8_t seconda // send pip command return send_fixedlen_packet(AddressByte::SYSTEM_AND_IMAGE, AP_MOUNT_TOPOTEK_ID3CHAR_PIP, true, pip_setting); } +#endif // HAL_MOUNT_SET_CAMERA_SOURCE_ENABLED // send camera information message to GCS void AP_Mount_Topotek::send_camera_information(mavlink_channel_t chan) const diff --git a/libraries/AP_Mount/AP_Mount_Topotek.h b/libraries/AP_Mount/AP_Mount_Topotek.h index bcabd3d4e2735f..3d52f0ff62827d 100755 --- a/libraries/AP_Mount/AP_Mount_Topotek.h +++ b/libraries/AP_Mount/AP_Mount_Topotek.h @@ -18,10 +18,11 @@ #pragma once -#include "AP_Mount_Backend_Serial.h" +#include "AP_Mount_config.h" #if HAL_MOUNT_TOPOTEK_ENABLED +#include "AP_Mount_Backend_Serial.h" #include #include #include @@ -78,9 +79,11 @@ class AP_Mount_Topotek : public AP_Mount_Backend_Serial // set camera picture-in-picture mode bool set_lens(uint8_t lens) override; +#if HAL_MOUNT_SET_CAMERA_SOURCE_ENABLED // set_camera_source is functionally the same as set_lens except primary and secondary lenses are specified by type // primary and secondary sources use the AP_Camera::CameraSource enum cast to uint8_t bool set_camera_source(uint8_t primary_source, uint8_t secondary_source) override; +#endif // send camera information message to GCS void send_camera_information(mavlink_channel_t chan) const override;