navigator: mission check refactor

The mission feasability checker was called with the same arguments
twice which made it hard to understand when a mission is marked valid.

The mission check should run in these two cases:
- When initializing (if home comes up) if there is already a mission saved.
- When the mission gets updated.
This commit is contained in:
Julian Oes
2016-08-05 10:17:06 +02:00
committed by Lorenz Meier
parent 8566cabd76
commit a956429c4c
2 changed files with 28 additions and 34 deletions
+1 -2
View File
@@ -211,7 +211,7 @@ private:
/**
* Check wether a mission is ready to go
*/
bool check_mission_valid();
void check_mission_valid();
/**
* Reset offboard mission
@@ -244,7 +244,6 @@ private:
} _mission_type;
bool _inited;
bool _home_inited;
bool _need_mission_reset;
MissionFeasibilityChecker _missionFeasibilityChecker; /**< class that checks if a mission is feasible */