Skip to content

Commit

Permalink
Navigator MissionBlock split is_mission_item_reached()
Browse files Browse the repository at this point in the history
  • Loading branch information
dagar committed Feb 14, 2018
1 parent c45b316 commit ef16b48
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/modules/navigator/mission_block.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,13 @@ MissionBlock::is_mission_item_reached()
return true;

default:
/* do nothing, this is a 3D waypoint */
break;
return position_achieved(_mission_item);
}
}

bool
MissionBlock::position_achieved(const mission_item_s &item)
{

hrt_abstime now = hrt_absolute_time();

Expand Down
2 changes: 2 additions & 0 deletions src/modules/navigator/mission_block.h
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,8 @@ class MissionBlock : public NavigatorMode
*/
bool is_mission_item_reached();

bool position_achieved(const mission_item_s &item);

/**
* Reset all reached flags
*/
Expand Down

0 comments on commit ef16b48

Please sign in to comment.