From 9241691b44c3103f69f4f5d67509c051ce3892f0 Mon Sep 17 00:00:00 2001 From: jasonshort Date: Fri, 20 May 2011 05:33:35 +0000 Subject: [PATCH] trying to improve Yaw issues. Enabled I term for yaw. This was mistakenly Imaxed to 0 git-svn-id: https://arducopter.googlecode.com/svn/trunk@2359 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- ArduCopterMega/Attitude.pde | 3 +-- ArduCopterMega/config.h | 6 +++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/ArduCopterMega/Attitude.pde b/ArduCopterMega/Attitude.pde index b1d23c7727..d9a1fc49c1 100644 --- a/ArduCopterMega/Attitude.pde +++ b/ArduCopterMega/Attitude.pde @@ -212,12 +212,11 @@ output_yaw_with_hold(boolean hold) // look to see if we have exited rate control properly - ie stopped turning if(rate_yaw_flag){ // we are still in motion from rate control - if(fabs(omega.z) < .2){ + if(fabs(omega.z) < .4){ clear_yaw_control(); hold = true; // just to be explicit //Serial.print("C"); }else{ - hold = false; // return to rate control until we slow down. //Serial.print("D"); } diff --git a/ArduCopterMega/config.h b/ArduCopterMega/config.h index afb0c4f283..04e114ef88 100644 --- a/ArduCopterMega/config.h +++ b/ArduCopterMega/config.h @@ -347,16 +347,16 @@ // YAW Control // #ifndef YAW_P -# define YAW_P 0.4 // increase for more aggressive Yaw Hold, decrease if it's bouncy +# define YAW_P 0.4 // increase for more aggressive Yaw Hold, decrease if it's bouncy #endif #ifndef YAW_I -# define YAW_I 0.1 // increased to .1 to try and get over user's steady state error caused by poor balance +# define YAW_I 0.01 // increased to .1 to try and get over user's steady state error caused by poor balance #endif #ifndef YAW_D # define YAW_D 0.13 // Trying a lower value to prevent odd behavior #endif #ifndef YAW_IMAX -# define YAW_IMAX 0 // Always 0 +# define YAW_IMAX 500 // Always 0 #endif //////////////////////////////////////////////////////////////////////////////