mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-04 15:00:35 +08:00
fixing takeoff mission and swtiching to previous flight mode after land/takeoff
This commit is contained in:
committed by
Lorenz Meier
parent
64349c7a09
commit
f17c5d8d55
@@ -78,6 +78,7 @@ Takeoff::on_activation()
|
||||
_navigator->get_mission_result()->reached = false;
|
||||
_navigator->get_mission_result()->finished = false;
|
||||
_navigator->set_mission_result_updated();
|
||||
reset_mission_item_reached();
|
||||
|
||||
/* convert mission item to current setpoint */
|
||||
struct position_setpoint_triplet_s *pos_sp_triplet = _navigator->get_position_setpoint_triplet();
|
||||
@@ -96,7 +97,7 @@ Takeoff::on_activation()
|
||||
void
|
||||
Takeoff::on_active()
|
||||
{
|
||||
if (is_mission_item_reached()) {
|
||||
if (is_mission_item_reached() && !_navigator->get_mission_result()->finished) {
|
||||
_navigator->get_mission_result()->finished = true;
|
||||
_navigator->set_mission_result_updated();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user