From d613f36e9cdf17ab62d41a58cf141dd347acc01e Mon Sep 17 00:00:00 2001 From: jasonshort Date: Fri, 27 May 2011 23:35:08 +0000 Subject: [PATCH] missed saving a file. git-svn-id: https://arducopter.googlecode.com/svn/trunk@2424 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- ArduCopterMega/Attitude.pde | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ArduCopterMega/Attitude.pde b/ArduCopterMega/Attitude.pde index ba40f69e89..3704173f2e 100644 --- a/ArduCopterMega/Attitude.pde +++ b/ArduCopterMega/Attitude.pde @@ -136,11 +136,11 @@ void calc_nav_throttle() } if(altitude_sensor == BARO){ - nav_throttle = g.pid_baro_throttle.get_pid(error, dTnav2, scaler); // .25 + nav_throttle = g.pid_baro_throttle.get_pid(error, delta_ms_medium_loop, scaler); // .2 nav_throttle = g.throttle_cruise + constrain(nav_throttle, -35, 80); }else{ - nav_throttle = g.pid_sonar_throttle.get_pid(error, dTnav2, scaler); // .5 - nav_throttle = g.throttle_cruise + constrain(nav_throttle, -70, 150); + nav_throttle = g.pid_sonar_throttle.get_pid(error, delta_ms_medium_loop, scaler); // .5 + nav_throttle = g.throttle_cruise + constrain(nav_throttle, -70, 100); } // simple filtering @@ -215,11 +215,12 @@ 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) < .4){ + if(fabs(omega.z) < .2){ 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"); }