From 8f993cde2b14d625a65d40bd2fe16bd4f05b2aa3 Mon Sep 17 00:00:00 2001 From: rmackay9 Date: Mon, 10 Sep 2012 02:03:32 +0900 Subject: [PATCH] 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 --- ArduCopter/commands_logic.pde | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ArduCopter/commands_logic.pde b/ArduCopter/commands_logic.pde index c625f0d191..4cf52d9375 100644 --- a/ArduCopter/commands_logic.pde +++ b/ArduCopter/commands_logic.pde @@ -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