Browse Source

ArduCopter: bug fix for ROI not working if user did not have a camera mount

Changed verify_nav_roi command to attempt to point at the target if our camera mount type is not pan_tilt nor pan_tilt_roll
master
rmackay9 13 years ago
parent
commit
5d3ddf1fc9
  1. 2
      ArduCopter/commands_logic.pde

2
ArduCopter/commands_logic.pde

@ -710,7 +710,7 @@ static bool verify_nav_roi() @@ -710,7 +710,7 @@ static bool verify_nav_roi()
{
#if MOUNT == ENABLED
// check if mount type requires us to rotate the quad
if( camera_mount.get_mount_type() == AP_Mount::k_tilt_roll ) {
if( camera_mount.get_mount_type() != AP_Mount::k_pan_tilt && camera_mount.get_mount_type() != AP_Mount::k_pan_tilt_roll ) {
// ensure yaw has gotten to within 2 degrees of the target
if( labs(wrap_180(ahrs.yaw_sensor-auto_yaw)) <= 200 ) {
nav_yaw = auto_yaw; // ensure target yaw for YAW_HOLD is our desired yaw

Loading…
Cancel
Save