From 14447c6e2d0a77f4d67bea10a4490ff12a10d9d1 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Fri, 4 Oct 2024 09:33:06 +0900 Subject: [PATCH] Copter: add comment to loc_from_cmd --- ArduCopter/mode.h | 1 + ArduCopter/mode_auto.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/ArduCopter/mode.h b/ArduCopter/mode.h index 68cc168574..009e74edd8 100644 --- a/ArduCopter/mode.h +++ b/ArduCopter/mode.h @@ -639,6 +639,7 @@ private: void loiter_to_alt_run(); void nav_attitude_time_run(); + // return the Location portion of a command. If the command's lat and lon and/or alt are zero the default_loc's lat,lon and/or alt are returned instead Location loc_from_cmd(const AP_Mission::Mission_Command& cmd, const Location& default_loc) const; SubMode _mode = SubMode::TAKEOFF; // controls which auto controller is run diff --git a/ArduCopter/mode_auto.cpp b/ArduCopter/mode_auto.cpp index 5780ce7f56..bc4bb21ac9 100644 --- a/ArduCopter/mode_auto.cpp +++ b/ArduCopter/mode_auto.cpp @@ -1513,6 +1513,7 @@ void ModeAuto::do_takeoff(const AP_Mission::Mission_Command& cmd) takeoff_start(cmd.content.location); } +// return the Location portion of a command. If the command's lat and lon and/or alt are zero the default_loc's lat,lon and/or alt are returned instead Location ModeAuto::loc_from_cmd(const AP_Mission::Mission_Command& cmd, const Location& default_loc) const { Location ret(cmd.content.location);