forked from Archive/PX4-Autopilot
mission_base: land_start_item invalid only when negative. (#22856)
rtl: land_start_item invalid only when negative. Update src/modules/navigator/rtl.cpp
This commit is contained in:
parent
a80a5a92f4
commit
8dcfcf5b9e
|
@ -123,7 +123,7 @@ protected:
|
|||
* @return true If mission has a land start of land item and a land item
|
||||
* @return false otherwise
|
||||
*/
|
||||
bool hasMissionLandStart() const { return _mission.land_start_index > 0 && _mission.land_index > 0;};
|
||||
bool hasMissionLandStart() const { return _mission.land_start_index >= 0 && _mission.land_index >= 0;};
|
||||
/**
|
||||
* @brief Go to next Mission Item
|
||||
* Go to next non jump mission item
|
||||
|
|
|
@ -604,7 +604,7 @@ void RTL::parameters_update()
|
|||
|
||||
bool RTL::hasMissionLandStart() const
|
||||
{
|
||||
return _mission_sub.get().land_start_index > 0;
|
||||
return _mission_sub.get().land_start_index >= 0 && _mission_sub.get().land_index >= 0;
|
||||
}
|
||||
|
||||
bool RTL::hasVtolLandApproach(const PositionYawSetpoint &rtl_position) const
|
||||
|
|
Loading…
Reference in New Issue