mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-07-02 23:00:35 +08:00
prevent RTL if already landing
This commit is contained in:
@@ -72,8 +72,9 @@ RTL::rtl_type() const
|
||||
void
|
||||
RTL::on_activation()
|
||||
{
|
||||
if (_navigator->get_land_detected()->landed) {
|
||||
// for safety reasons don't go into RTL if landed
|
||||
if (_navigator->get_land_detected()->landed
|
||||
|| (_navigator->get_position_setpoint_triplet()->current.type == position_setpoint_s::SETPOINT_TYPE_LAND)) {
|
||||
// for safety reasons don't go into RTL if landed or currently in landing
|
||||
_rtl_state = RTL_STATE_LANDED;
|
||||
|
||||
} else if ((rtl_type() == RTL_LAND) && _navigator->on_mission_landing()) {
|
||||
|
||||
Reference in New Issue
Block a user