Skip to content

Commit

Permalink
Copter: add comment to loc_from_cmd
Browse files Browse the repository at this point in the history
  • Loading branch information
rmackay9 authored and peterbarker committed Oct 6, 2024
1 parent be1c87f commit 14447c6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions ArduCopter/mode.h
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,7 @@ class ModeAuto : public Mode {
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
Expand Down
1 change: 1 addition & 0 deletions ArduCopter/mode_auto.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 14447c6

Please sign in to comment.