Skip to content

Commit

Permalink
MissionBase: hasMissionLandStart should only return true if mission i…
Browse files Browse the repository at this point in the history
…s valid

Signed-off-by: Silvan Fuhrer <[email protected]>
  • Loading branch information
sfuhrer committed Apr 11, 2024
1 parent 05672f3 commit 5fab21d
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/modules/navigator/mission_base.h
Original file line number Diff line number Diff line change
Expand Up @@ -118,12 +118,12 @@ class MissionBase : public MissionBlock, public ModuleParams
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
Expand Down

0 comments on commit 5fab21d

Please sign in to comment.