mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-23 08:57:34 +08:00
Set correct setpoint type for vtol transitions
This commit is contained in:
@@ -334,6 +334,11 @@ MissionBlock::item_contains_position(const struct mission_item_s *item)
|
||||
void
|
||||
MissionBlock::mission_item_to_position_setpoint(const struct mission_item_s *item, struct position_setpoint_s *sp)
|
||||
{
|
||||
/* set the correct setpoint for vtol transition */
|
||||
if(item->nav_cmd == NAV_CMD_DO_VTOL_TRANSITION) {
|
||||
sp->type = position_setpoint_s::SETPOINT_TYPE_POSITION;
|
||||
}
|
||||
|
||||
/* don't change the setpoint for non-position items */
|
||||
if (!item_contains_position(item)) {
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user