From 3ce48cb42cacb125d430ff14efcd8117f4c23d89 Mon Sep 17 00:00:00 2001 From: Jason Short Date: Sat, 14 Jul 2012 12:23:10 -0700 Subject: [PATCH] Arducopter: Yaw stop fix --- ArduCopter/ArduCopter.pde | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ArduCopter/ArduCopter.pde b/ArduCopter/ArduCopter.pde index 1f168f5ccc..0846019e9d 100644 --- a/ArduCopter/ArduCopter.pde +++ b/ArduCopter/ArduCopter.pde @@ -1511,13 +1511,12 @@ void update_yaw_mode(void) g.rc_4.servo_out = get_acro_yaw(g.rc_4.control_in); yaw_stopped = false; yaw_timer = 150; + }else if (!yaw_stopped){ g.rc_4.servo_out = get_acro_yaw(0); yaw_timer--; - if ( abs(omega.z * DEGX100) < 1000 ){ - yaw_stopped = true; - } - if(yaw_timer == 0){ + + if((yaw_timer == 0) || (fabs(omega.z) < .17)){ yaw_stopped = true; nav_yaw = ahrs.yaw_sensor; }