From af0e8b558432dc61cf92ce7b084e7285b59cb8f6 Mon Sep 17 00:00:00 2001 From: Tom Pittenger Date: Fri, 25 Oct 2024 22:50:52 -0700 Subject: [PATCH] AP_ExternalControl: add count --- ArduPlane/AP_ExternalControl_Plane.h | 2 +- libraries/AP_DDS/AP_DDS_ExternalControl.cpp | 2 +- libraries/AP_ExternalControl/AP_ExternalControl.h | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ArduPlane/AP_ExternalControl_Plane.h b/ArduPlane/AP_ExternalControl_Plane.h index e2aca6c3a8eef..e7c02666cd56e 100644 --- a/ArduPlane/AP_ExternalControl_Plane.h +++ b/ArduPlane/AP_ExternalControl_Plane.h @@ -20,7 +20,7 @@ class AP_ExternalControl_Plane : public AP_ExternalControl { /* Sets the trajectory target. */ - bool set_trajectory(const Location trajectory[5]) override WARN_IF_UNUSED; + bool set_trajectory(const Location trajectory[5], const uint8_t count) override WARN_IF_UNUSED; }; #endif // AP_EXTERNAL_CONTROL_ENABLED diff --git a/libraries/AP_DDS/AP_DDS_ExternalControl.cpp b/libraries/AP_DDS/AP_DDS_ExternalControl.cpp index bc53b49b01b1b..0c6c4be15529a 100644 --- a/libraries/AP_DDS/AP_DDS_ExternalControl.cpp +++ b/libraries/AP_DDS/AP_DDS_ExternalControl.cpp @@ -98,7 +98,7 @@ bool AP_DDS_External_Control::handle_trajectory_control(ardupilot_msgs_msg_Traje locs[i].lat = trajectory.alts[i] * 1e7; } - return external_control->set_trajectory(locs); + return external_control->set_trajectory(locs, 5); } bool AP_DDS_External_Control::convert_alt_frame(const uint8_t frame_in, Location::AltFrame& frame_out) diff --git a/libraries/AP_ExternalControl/AP_ExternalControl.h b/libraries/AP_ExternalControl/AP_ExternalControl.h index dded2f42a1d22..6e66f712c686f 100644 --- a/libraries/AP_ExternalControl/AP_ExternalControl.h +++ b/libraries/AP_ExternalControl/AP_ExternalControl.h @@ -35,7 +35,7 @@ class AP_ExternalControl /* Sets the trajectory target. */ - virtual bool set_trajectory(const Location trajectory[5]) WARN_IF_UNUSED { + virtual bool set_trajectory(const Location trajectory[5], const uint8_t count) WARN_IF_UNUSED { return false; }