mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
RT: only chose mission RTL if mission is valid
Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
parent
5fab21d099
commit
926e7878af
@ -617,7 +617,8 @@ void RTL::parameters_update()
|
||||
|
||||
bool RTL::hasMissionLandStart() const
|
||||
{
|
||||
return _mission_sub.get().land_start_index >= 0 && _mission_sub.get().land_index >= 0;
|
||||
return _mission_sub.get().land_start_index >= 0 && _mission_sub.get().land_index >= 0
|
||||
&& _navigator->get_mission_result()->valid;
|
||||
}
|
||||
|
||||
bool RTL::hasVtolLandApproach(const PositionYawSetpoint &rtl_position) const
|
||||
|
||||
@ -97,6 +97,11 @@ private:
|
||||
};
|
||||
|
||||
private:
|
||||
|
||||
/**
|
||||
* @brief Check mission landing validity
|
||||
* @return true if mission has a land start, a land and is valid
|
||||
*/
|
||||
bool hasMissionLandStart() const;
|
||||
|
||||
/**
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user