mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 00:43:35 +08:00
explicitly set param2 to 0 in existing *DO_VTOL_TRANSITION commands. add a guard against NaNs.
This commit is contained in:
@@ -699,6 +699,7 @@ MissionBlock::set_land_item(struct mission_item_s *item, bool at_current_locatio
|
||||
vehicle_command_s vcmd = {};
|
||||
vcmd.command = NAV_CMD_DO_VTOL_TRANSITION;
|
||||
vcmd.param1 = vtol_vehicle_status_s::VEHICLE_VTOL_STATE_MC;
|
||||
vcmd.param2 = 0.0f;
|
||||
_navigator->publish_vehicle_cmd(&vcmd);
|
||||
}
|
||||
|
||||
@@ -748,6 +749,7 @@ MissionBlock::set_vtol_transition_item(struct mission_item_s *item, const uint8_
|
||||
{
|
||||
item->nav_cmd = NAV_CMD_DO_VTOL_TRANSITION;
|
||||
item->params[0] = (float) new_mode;
|
||||
item->params[1] = 0.0f;
|
||||
item->yaw = _navigator->get_local_position()->heading;
|
||||
item->autocontinue = true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user