forked from Archive/PX4-Autopilot
mission: The mission check on activation should only be performed for a mission, not RTL.
We need to make sure that when the RTL is triggered, it should not reevaluate it, as when it was valid but evaluated to false on activation, it can't do a RTL.
This commit is contained in:
parent
cb8520427c
commit
c5fde63440
|
@ -86,6 +86,8 @@ Mission::on_activation()
|
|||
{
|
||||
_need_mission_save = true;
|
||||
|
||||
check_mission_valid(true);
|
||||
|
||||
MissionBase::on_activation();
|
||||
}
|
||||
|
||||
|
|
|
@ -207,8 +207,6 @@ MissionBase::on_activation()
|
|||
_mission_has_been_activated = true;
|
||||
_system_disarmed_while_inactive = false;
|
||||
|
||||
check_mission_valid(true);
|
||||
|
||||
update_mission();
|
||||
|
||||
// reset the cache and fill it with the items up to the previous item. The cache contains
|
||||
|
|
|
@ -215,6 +215,12 @@ protected:
|
|||
*/
|
||||
bool isMissionValid() const;
|
||||
|
||||
/**
|
||||
* @brief Check whether a mission is ready to go
|
||||
* @param[in] forced flag if the check has to be run irregardles of any updates.
|
||||
*/
|
||||
void check_mission_valid(bool forced = false);
|
||||
|
||||
/**
|
||||
* On mission update
|
||||
* Change behaviour after external mission update.
|
||||
|
@ -344,12 +350,6 @@ private:
|
|||
*/
|
||||
void updateMavlinkMission();
|
||||
|
||||
/**
|
||||
* @brief Check whether a mission is ready to go
|
||||
* @param[in] forced flag if the check has to be run irregardles of any updates.
|
||||
*/
|
||||
void check_mission_valid(bool forced = false);
|
||||
|
||||
/**
|
||||
* Reset mission
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue