MissionBase: hasMissionLandStart should only return true if mission is valid

Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
Silvan Fuhrer 2024-04-05 15:48:50 +02:00
parent 05672f343d
commit 5fab21d099

View File

@ -118,12 +118,12 @@ protected:
void getNextPositionItems(int32_t start_index, int32_t items_index[], size_t &num_found_items,
uint8_t max_num_items);
/**
* @brief Has Mission a Land Start or Land Item
* @brief Mission has a land start, a land, and is valid
*
* @return true If mission has a land start of land item and a land item
* @return true If mission has a land start and a land item and is valid
* @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 && isMissionValid();};
/**
* @brief Go to next Mission Item
* Go to next non jump mission item