mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-15 03:50:35 +08:00
Auto take-off corner case: Reset work item type when landed
This commit is contained in:
@@ -146,6 +146,11 @@ Mission::on_inactive()
|
||||
/* require takeoff after non-loiter or landing */
|
||||
if (!_navigator->get_can_loiter_at_sp() || _navigator->get_land_detected()->landed) {
|
||||
_need_takeoff = true;
|
||||
/* Reset work item type to default if auto take-off has been paused or aborted,
|
||||
and we landed in manual mode. */
|
||||
if (_work_item_type == WORK_ITEM_TYPE_TAKEOFF) {
|
||||
_work_item_type = WORK_ITEM_TYPE_DEFAULT;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user