From b830afd67837092145e39bdc4cc46d435216d667 Mon Sep 17 00:00:00 2001 From: jasonshort Date: Sun, 23 Jan 2011 02:08:46 +0000 Subject: [PATCH] was adding throttle cruise twice. git-svn-id: https://arducopter.googlecode.com/svn/trunk@1527 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- ArduCopterMega/flight_control.pde | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ArduCopterMega/flight_control.pde b/ArduCopterMega/flight_control.pde index 84260ad36b..83f7f9fb8a 100644 --- a/ArduCopterMega/flight_control.pde +++ b/ArduCopterMega/flight_control.pde @@ -28,6 +28,7 @@ void calc_nav_throttle() // limit output of throttle control t_out = throttle_cruise + constrain(t_out, -50, 100); + } else { // SONAR t_out = pid_sonar_throttle.get_pid(altitude_error, delta_ms_fast_loop, 1.0); @@ -36,7 +37,7 @@ void calc_nav_throttle() t_out = throttle_cruise + constrain(t_out, -60, 100); } - nav_throttle = (float)(throttle_cruise + t_out) * angle_boost(); + nav_throttle = (float)t_out * angle_boost(); } float angle_boost()