Skip to content

Commit

Permalink
AP_Mount: Add handler for CAMERA_CAPTURE_STATUS request
Browse files Browse the repository at this point in the history
  • Loading branch information
nexton-winjeel committed Nov 8, 2023
1 parent ddf457e commit 8faecaf
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libraries/AP_Mount/AP_Mount.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -850,6 +850,16 @@ void AP_Mount::send_camera_settings(uint8_t instance, mavlink_channel_t chan) co
backend->send_camera_settings(chan);
}

// send camera capture status message to GCS
void AP_Mount::send_camera_capture_status(uint8_t instance, mavlink_channel_t chan) const
{
auto *backend = get_instance(instance);
if (backend == nullptr) {
return;
}
backend->send_camera_capture_status(chan);
}

// get rangefinder distance. Returns true on success
bool AP_Mount::get_rangefinder_distance(uint8_t instance, float& distance_m) const
{
Expand Down
3 changes: 3 additions & 0 deletions libraries/AP_Mount/AP_Mount.h
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@ class AP_Mount
// send camera settings message to GCS
void send_camera_settings(uint8_t instance, mavlink_channel_t chan) const;

// send camera capture status message to GCS
void send_camera_capture_status(uint8_t instance, mavlink_channel_t chan) const;

//
// rangefinder
//
Expand Down
3 changes: 3 additions & 0 deletions libraries/AP_Mount/AP_Mount_Backend.h
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ class AP_Mount_Backend
// send camera settings message to GCS
virtual void send_camera_settings(mavlink_channel_t chan) const {}

// send camera capture status message to GCS
virtual void send_camera_capture_status(mavlink_channel_t chan) const {}

#if AP_MOUNT_POI_TO_LATLONALT_ENABLED
// get poi information. Returns true on success and fills in gimbal attitude, location and poi location
bool get_poi(uint8_t instance, Quaternion &quat, Location &loc, Location &poi_loc);
Expand Down

0 comments on commit 8faecaf

Please sign in to comment.