navigator: publish distance sensor mode change request when in RTL landing phase or during mission landing

This commit is contained in:
Konrad
2024-09-16 09:11:23 +02:00
committed by KonradRudin
parent 1755b8304e
commit aab2390e51
9 changed files with 78 additions and 1 deletions
@@ -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) {