Takeoff: Set home yaw if executed as flight mode command.

This commit is contained in:
Lorenz Meier
2015-12-28 15:14:40 +01:00
parent 3cbf69cef5
commit 511c663996
+2
View File
@@ -81,6 +81,8 @@ Takeoff::on_activation()
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);