From 99b32a39c43aa308074f479dc68b94ddbe026a3e Mon Sep 17 00:00:00 2001 From: rmackay9 Date: Fri, 7 Dec 2012 13:01:40 +0900 Subject: [PATCH] ArduCopter: InertialNav time constant CH6 tuning changed to only update enabled axis --- ArduCopter/ArduCopter.pde | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/ArduCopter/ArduCopter.pde b/ArduCopter/ArduCopter.pde index 5abe716f11..219c653c49 100644 --- a/ArduCopter/ArduCopter.pde +++ b/ArduCopter/ArduCopter.pde @@ -2158,12 +2158,14 @@ static void tuning(){ break; #endif -#if INERTIAL_NAV_XY == ENABLED || INERTIAL_NAV_Z == ENABLED case CH6_INAV_TC: +#if INERTIAL_NAV_XY == ENABLED inertial_nav.set_time_constant_xy(tuning_value); - inertial_nav.set_time_constant_z(tuning_value); - break; #endif +#if INERTIAL_NAV_Z == ENABLED + inertial_nav.set_time_constant_z(tuning_value); +#endif + break; case CH6_THR_ACCEL_KP: g.pid_throttle_accel.kP(tuning_value);