mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-03 12:58:52 +08:00
Navigator Fix: Do not set the closest mission item in normal mission mode (#9646)
- fixes #9606
This commit is contained in:
committed by
Daniel Agar
parent
9151351b8d
commit
4697bf428b
@@ -155,7 +155,11 @@ void
|
||||
Mission::on_activation()
|
||||
{
|
||||
if (_mission_waypoints_changed) {
|
||||
_current_offboard_mission_index = index_closest_mission_item();
|
||||
// do not set the closest mission item in the normal mission mode
|
||||
if (_mission_execution_mode != mission_result_s::MISSION_EXECUTION_MODE_NORMAL) {
|
||||
_current_offboard_mission_index = index_closest_mission_item();
|
||||
}
|
||||
|
||||
_mission_waypoints_changed = false;
|
||||
}
|
||||
|
||||
@@ -199,7 +203,11 @@ Mission::on_active()
|
||||
/* reset mission items if needed */
|
||||
if (offboard_updated || _mission_waypoints_changed || _execution_mode_changed) {
|
||||
if (_mission_waypoints_changed) {
|
||||
_current_offboard_mission_index = index_closest_mission_item();
|
||||
// do not set the closest mission item in the normal mission mode
|
||||
if (_mission_execution_mode != mission_result_s::MISSION_EXECUTION_MODE_NORMAL) {
|
||||
_current_offboard_mission_index = index_closest_mission_item();
|
||||
}
|
||||
|
||||
_mission_waypoints_changed = false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user