mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-28 10:13:33 +08:00
navigator: publish distance sensor mode change request when in RTL landing phase or during mission landing
This commit is contained in:
@@ -304,6 +304,28 @@ void RTL::on_active()
|
||||
}
|
||||
}
|
||||
|
||||
bool RTL::isLanding()
|
||||
{
|
||||
bool is_landing{false};
|
||||
|
||||
switch (_rtl_type) {
|
||||
case RtlType::RTL_MISSION_FAST:
|
||||
case RtlType::RTL_MISSION_FAST_REVERSE:
|
||||
case RtlType::RTL_DIRECT_MISSION_LAND:
|
||||
is_landing = _rtl_mission_type_handle->isLanding();
|
||||
break;
|
||||
|
||||
case RtlType::RTL_DIRECT:
|
||||
is_landing = _rtl_direct.isLanding();
|
||||
break;
|
||||
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return is_landing;
|
||||
}
|
||||
|
||||
void RTL::setRtlTypeAndDestination()
|
||||
{
|
||||
|
||||
|
||||
Reference in New Issue
Block a user