mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
mission_base: Run feasibility checker only after first global position has been published
This commit is contained in:
parent
6c6142ba79
commit
acd750e033
@ -1369,8 +1369,9 @@ bool MissionBase::checkMissionDataChanged(mission_s new_mission)
|
||||
|
||||
bool MissionBase::canRunMissionFeasibility()
|
||||
{
|
||||
return _navigator->home_global_position_valid() &&
|
||||
(_geofence_status_sub.get().timestamp > 0) &&
|
||||
return _navigator->home_global_position_valid() && // Need to have a home position checked
|
||||
_navigator->get_global_position()->timestamp > 0 && // Need to have a position, for first waypoint check
|
||||
(_geofence_status_sub.get().timestamp > 0) && // Geofence data must be loaded
|
||||
(_geofence_status_sub.get().geofence_id == _mission.geofence_id) &&
|
||||
(_geofence_status_sub.get().status == geofence_status_s::GF_STATUS_READY);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user