mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-25 00:03:37 +08:00
mission_base: on mission end, set loiter position from previous position type setpoint
This commit is contained in:
committed by
Alex Klimaj
parent
150dd0bff0
commit
f3979c0fcf
@@ -553,7 +553,9 @@ void MissionBase::setEndOfMissionItems()
|
|||||||
_mission_item.nav_cmd = NAV_CMD_IDLE;
|
_mission_item.nav_cmd = NAV_CMD_IDLE;
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
if (pos_sp_triplet->current.valid && pos_sp_triplet->current.type == position_setpoint_s::SETPOINT_TYPE_LOITER) {
|
if (pos_sp_triplet->current.valid &&
|
||||||
|
(pos_sp_triplet->current.type == position_setpoint_s::SETPOINT_TYPE_LOITER ||
|
||||||
|
pos_sp_triplet->current.type == position_setpoint_s::SETPOINT_TYPE_POSITION)) {
|
||||||
setLoiterItemFromCurrentPositionSetpoint(&_mission_item);
|
setLoiterItemFromCurrentPositionSetpoint(&_mission_item);
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user