From 8d3d1035d8b4c5413ac5ef92f1f6deb04da8861a Mon Sep 17 00:00:00 2001 From: Arthur Benemann Date: Fri, 15 May 2015 23:52:45 -0300 Subject: [PATCH] GCS_MAVLink: fix copter/mount yaw control for MOUNT_CONTROL messages This is required for the new version of cable-cam (which uses MOUNT_CONTROL instead of ROI). --- ArduCopter/GCS_Mavlink.pde | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArduCopter/GCS_Mavlink.pde b/ArduCopter/GCS_Mavlink.pde index 2bb1756a26..add2b4e5ea 100644 --- a/ArduCopter/GCS_Mavlink.pde +++ b/ArduCopter/GCS_Mavlink.pde @@ -1642,6 +1642,10 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg) case MAVLINK_MSG_ID_MOUNT_CONTROL: camera_mount.control_msg(msg); + // check if mount type requires us to rotate the quad + if(!camera_mount.has_pan_control()) { + set_auto_yaw_look_at_heading(mavlink_msg_mount_control_get_input_c(msg)/100.0f, 0.0f, 0, 0); + } break; #endif // MOUNT == ENABLED