mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
Navigator: same logic for VTOL_TAKEOFF as for TAKEOFF (#22518)
Set the setpoint type to POSITION if already in air, not to TAKEOFF. Signed-off-by: Silvan Fuhrer <silvan@auterion.com>
This commit is contained in:
parent
ebae9ae3d7
commit
8aab3e8013
@ -694,6 +694,7 @@ MissionBlock::mission_item_to_position_setpoint(const mission_item_s &item, posi
|
||||
break;
|
||||
|
||||
case NAV_CMD_TAKEOFF:
|
||||
case NAV_CMD_VTOL_TAKEOFF:
|
||||
|
||||
// if already flying (armed and !landed) treat TAKEOFF like regular POSITION
|
||||
if ((_navigator->get_vstatus()->arming_state == vehicle_status_s::ARMING_STATE_ARMED)
|
||||
@ -707,10 +708,6 @@ MissionBlock::mission_item_to_position_setpoint(const mission_item_s &item, posi
|
||||
|
||||
break;
|
||||
|
||||
case NAV_CMD_VTOL_TAKEOFF:
|
||||
sp->type = position_setpoint_s::SETPOINT_TYPE_TAKEOFF;
|
||||
break;
|
||||
|
||||
case NAV_CMD_LAND:
|
||||
case NAV_CMD_VTOL_LAND:
|
||||
sp->type = position_setpoint_s::SETPOINT_TYPE_LAND;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user