Copter: add comment to loc_from_cmd

This commit is contained in:
Randy Mackay 2024-10-04 09:33:06 +09:00 committed by Peter Barker
parent be1c87f3d1
commit 14447c6e2d
2 changed files with 2 additions and 0 deletions

View File

@ -639,6 +639,7 @@ private:
void loiter_to_alt_run(); void loiter_to_alt_run();
void nav_attitude_time_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; 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 SubMode _mode = SubMode::TAKEOFF; // controls which auto controller is run

View File

@ -1513,6 +1513,7 @@ void ModeAuto::do_takeoff(const AP_Mission::Mission_Command& cmd)
takeoff_start(cmd.content.location); 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 ModeAuto::loc_from_cmd(const AP_Mission::Mission_Command& cmd, const Location& default_loc) const
{ {
Location ret(cmd.content.location); Location ret(cmd.content.location);