mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 09:30:35 +08:00
in mc auto: do not reset the position sp while near the waypoint, should make switching to manual pos control smoother
This commit is contained in:
committed by
Lorenz Meier
parent
5a009ce4c8
commit
09b5bdb1ee
@@ -84,12 +84,11 @@ Takeoff::on_activation()
|
||||
struct position_setpoint_triplet_s *pos_sp_triplet = _navigator->get_position_setpoint_triplet();
|
||||
pos_sp_triplet->previous.valid = false;
|
||||
mission_item_to_position_setpoint(&_mission_item, &pos_sp_triplet->current);
|
||||
pos_sp_triplet->current.type = position_setpoint_s::SETPOINT_TYPE_LOITER;
|
||||
pos_sp_triplet->current.yaw = _navigator->get_home_position()->yaw;
|
||||
pos_sp_triplet->current.yaw_valid = true;
|
||||
pos_sp_triplet->next.valid = false;
|
||||
|
||||
_navigator->set_can_loiter_at_sp(pos_sp_triplet->current.type == position_setpoint_s::SETPOINT_TYPE_LOITER);
|
||||
_navigator->set_can_loiter_at_sp(true);
|
||||
|
||||
_navigator->set_position_setpoint_triplet_updated();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user