mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 08:13:34 +08:00
navigator: publish distance sensor mode change request when in RTL landing phase or during mission landing
This commit is contained in:
@@ -60,6 +60,12 @@ void RtlMissionFastReverse::on_inactive()
|
||||
_mission.current_seq : -1;
|
||||
}
|
||||
|
||||
void RtlMissionFastReverse::on_inactivation()
|
||||
{
|
||||
MissionBase::on_inactivation();
|
||||
_in_landing_phase = false;
|
||||
}
|
||||
|
||||
void RtlMissionFastReverse::on_activation()
|
||||
{
|
||||
_home_pos_sub.update();
|
||||
@@ -120,6 +126,7 @@ void RtlMissionFastReverse::setActiveMissionItems()
|
||||
_mission_item.nav_cmd == NAV_CMD_VTOL_TAKEOFF ||
|
||||
num_found_items == 0) {
|
||||
handleLanding(new_work_item_type);
|
||||
_in_landing_phase = true;
|
||||
|
||||
} else {
|
||||
// convert mission item to a simple waypoint, keep loiter to alt
|
||||
@@ -131,6 +138,8 @@ void RtlMissionFastReverse::setActiveMissionItems()
|
||||
_mission_item.time_inside = 0.0f;
|
||||
|
||||
pos_sp_triplet->previous = pos_sp_triplet->current;
|
||||
|
||||
_in_landing_phase = false;
|
||||
}
|
||||
|
||||
if (num_found_items > 0) {
|
||||
|
||||
Reference in New Issue
Block a user