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);