forked from Archive/PX4-Autopilot
mav_cmd_do_reposition now obeys the ground speed argument
This commit is contained in:
parent
dc49e259b3
commit
21bcc0d2f4
|
@ -328,7 +328,15 @@ Navigator::run()
|
||||||
rep->current.loiter_radius = get_loiter_radius();
|
rep->current.loiter_radius = get_loiter_radius();
|
||||||
rep->current.loiter_direction = 1;
|
rep->current.loiter_direction = 1;
|
||||||
rep->current.type = position_setpoint_s::SETPOINT_TYPE_LOITER;
|
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.cruising_throttle = get_cruising_throttle();
|
||||||
rep->current.acceptance_radius = get_acceptance_radius();
|
rep->current.acceptance_radius = get_acceptance_radius();
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue