From 40a132f2e044b6b02eabb8ca20225033f358d944 Mon Sep 17 00:00:00 2001 From: Nick Exton Date: Wed, 24 Jul 2024 12:28:46 +1000 Subject: [PATCH] AP_Mount: Use AP_MAVLINK_MSG_VIDEO_STREAM_INFORMATION_ENABLED guard --- libraries/AP_Mount/AP_Mount.cpp | 2 ++ libraries/AP_Mount/AP_Mount.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/libraries/AP_Mount/AP_Mount.cpp b/libraries/AP_Mount/AP_Mount.cpp index 908de2febc104..0369f3703ba9e 100644 --- a/libraries/AP_Mount/AP_Mount.cpp +++ b/libraries/AP_Mount/AP_Mount.cpp @@ -905,6 +905,7 @@ void AP_Mount::send_camera_capture_status(uint8_t instance, mavlink_channel_t ch backend->send_camera_capture_status(chan); } +#if AP_MAVLINK_MSG_VIDEO_STREAM_INFORMATION_ENABLED // send a VIDEO_STREAM_INFORMATION message to GCS bool AP_Mount::send_video_stream_information(uint8_t instance, mavlink_channel_t chan) { @@ -914,6 +915,7 @@ bool AP_Mount::send_video_stream_information(uint8_t instance, mavlink_channel_t } return backend->send_video_stream_information(chan); } +#endif // get rangefinder distance. Returns true on success bool AP_Mount::get_rangefinder_distance(uint8_t instance, float& distance_m) const diff --git a/libraries/AP_Mount/AP_Mount.h b/libraries/AP_Mount/AP_Mount.h index b21a38a9e94a8..93425202dbdf9 100644 --- a/libraries/AP_Mount/AP_Mount.h +++ b/libraries/AP_Mount/AP_Mount.h @@ -272,9 +272,11 @@ class AP_Mount // send camera capture status message to GCS void send_camera_capture_status(uint8_t instance, mavlink_channel_t chan) const; +#if AP_MAVLINK_MSG_VIDEO_STREAM_INFORMATION_ENABLED // send camera information message to GCS // returns true if the message was sent bool send_video_stream_information(uint8_t instance, mavlink_channel_t chan); +#endif // // rangefinder