Arducopter: Yaw stop fix

This commit is contained in:
Jason Short 2012-07-14 12:23:10 -07:00
parent 804898c2a5
commit 3ce48cb42c
1 changed files with 3 additions and 4 deletions

View File

@ -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;
}