Skip to content

Commit

Permalink
AP_Mission: Set DO_MOUNT_CONTROL.mode when converting command to MAVLink
Browse files Browse the repository at this point in the history
  • Loading branch information
nexton-winjeel committed Oct 1, 2024
1 parent 782fd3b commit 85e0f10
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libraries/AP_Mission/AP_Mission.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1241,6 +1241,7 @@ MAV_MISSION_RESULT AP_Mission::mavlink_int_to_mission_cmd(const mavlink_mission_
break;

case MAV_CMD_DO_MOUNT_CONTROL: // MAV ID: 205
// TODO: this is only valid if packet.z == MAV_MOUNT_MODE_MAVLINK_TARGETING
cmd.content.mount_control.pitch = packet.param1;
cmd.content.mount_control.roll = packet.param2;
cmd.content.mount_control.yaw = packet.param3;
Expand Down Expand Up @@ -1757,6 +1758,7 @@ bool AP_Mission::mission_cmd_to_mavlink_int(const AP_Mission::Mission_Command& c
packet.param1 = cmd.content.mount_control.pitch;
packet.param2 = cmd.content.mount_control.roll;
packet.param3 = cmd.content.mount_control.yaw;
packet.z = MAV_MOUNT_MODE_MAVLINK_TARGETING;
break;

case MAV_CMD_DO_SET_CAM_TRIGG_DIST: // MAV ID: 206
Expand Down

0 comments on commit 85e0f10

Please sign in to comment.