Skip to content
Snippets Groups Projects
Commit 78db6981 authored by Andrew Tridgell's avatar Andrew Tridgell
Browse files

AP_Mount: allow a MOUNT_CONTROL message to reset RC targetting

fixes issue #1617
parent 84f82dd1
No related branches found
No related tags found
No related merge requests found
......@@ -511,6 +511,12 @@ void AP_Mount::control_msg(mavlink_message_t *msg)
_roll_angle = vec.x;
_tilt_angle = vec.y;
_pan_angle = vec.z;
// also reset control angles, in radians. This allows a
// MOUNT_CONTROL message to be used to reset the mount to zero
// offset when in joystick speed relative mode
_roll_control_angle = radians(_roll_angle);
_tilt_control_angle = radians(_tilt_angle);
_pan_control_angle = radians(_pan_angle);
}
break;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment