Skip to content

Commit

Permalink
mav_cmd_do_reposition now obeys the ground speed argument
Browse files Browse the repository at this point in the history
  • Loading branch information
Jake Dahl authored and dagar committed Dec 8, 2018
1 parent dc49e25 commit 21bcc0d
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion src/modules/navigator/navigator_main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,15 @@ Navigator::run()
rep->current.loiter_radius = get_loiter_radius();
rep->current.loiter_direction = 1;
rep->current.type = position_setpoint_s::SETPOINT_TYPE_LOITER;
rep->current.cruising_speed = get_cruising_speed();

// If no argument for ground speed, use default value.
if (cmd.param1 <= 0 || !PX4_ISFINITE(cmd.param1)) {
rep->current.cruising_speed = get_cruising_speed();

} else {
rep->current.cruising_speed = cmd.param1;
}

rep->current.cruising_throttle = get_cruising_throttle();
rep->current.acceptance_radius = get_acceptance_radius();

Expand Down

0 comments on commit 21bcc0d

Please sign in to comment.