From bcd3e7db56a67345de11cd692a734db4e6831dfe Mon Sep 17 00:00:00 2001 From: jasonshort Date: Mon, 10 Jan 2011 02:49:45 +0000 Subject: [PATCH] renamed err to altitude_error git-svn-id: https://arducopter.googlecode.com/svn/trunk@1478 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- ArduCopterMega/flight_control.pde | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ArduCopterMega/flight_control.pde b/ArduCopterMega/flight_control.pde index 56ebd424ce..ba3356b897 100644 --- a/ArduCopterMega/flight_control.pde +++ b/ArduCopterMega/flight_control.pde @@ -24,13 +24,13 @@ void calc_nav_throttle() long t_out; if(altitude_sensor == BARO) { - t_out = pid_baro_throttle.get_pid(err, deltaMiliSeconds, 1.0); + t_out = pid_baro_throttle.get_pid(altitude_error, deltaMiliSeconds, 1.0); // limit output of throttle control t_out = throttle_cruise + constrain(t_out, -50, 100); } else { // SONAR - t_out = pid_sonar_throttle.get_pid(err, deltaMiliSeconds, 1.0); + t_out = pid_sonar_throttle.get_pid(altitude_error, deltaMiliSeconds, 1.0); // limit output of throttle control t_out = throttle_cruise + constrain(t_out, -60, 100);