Skip to content

Commit 8fba355

Browse files
committed
mission: delay until: mark next setpoint invalid
Fixes bug with the NAV_CMD_DELAY where the copter would "pace" back and forth while waiting at the delay waypoint
1 parent 089887f commit 8fba355

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/modules/navigator/mission.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -263,6 +263,10 @@ void Mission::setActiveMissionItems()
263263
pos_sp_triplet->next.valid = false;
264264
}
265265

266+
} else if (_mission_item.nav_cmd == NAV_CMD_DELAY) {
267+
// Invalidate next waypoint to ensure vehicle holds position and doesn't try to track ahead
268+
pos_sp_triplet->next.valid = false;
269+
266270
} else {
267271
handleVtolTransition(new_work_item_type, next_mission_items, num_found_items);
268272
}

0 commit comments

Comments
 (0)