Skip to content

Commit f3979c0

Browse files
Luka FilipovićAlexKlimaj
authored andcommitted
mission_base: on mission end, set loiter position from previous position type setpoint
1 parent 150dd0b commit f3979c0

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/modules/navigator/mission_base.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -553,7 +553,9 @@ void MissionBase::setEndOfMissionItems()
553553
_mission_item.nav_cmd = NAV_CMD_IDLE;
554554

555555
} else {
556-
if (pos_sp_triplet->current.valid && pos_sp_triplet->current.type == position_setpoint_s::SETPOINT_TYPE_LOITER) {
556+
if (pos_sp_triplet->current.valid &&
557+
(pos_sp_triplet->current.type == position_setpoint_s::SETPOINT_TYPE_LOITER ||
558+
pos_sp_triplet->current.type == position_setpoint_s::SETPOINT_TYPE_POSITION)) {
557559
setLoiterItemFromCurrentPositionSetpoint(&_mission_item);
558560

559561
} else {

0 commit comments

Comments
 (0)