ArduCopter: InertialNav time constant CH6 tuning changed to only update enabled axis

This commit is contained in:
rmackay9 2012-12-07 13:01:40 +09:00
parent cca9f9dbce
commit 99b32a39c4
1 changed files with 5 additions and 3 deletions

View File

@ -2158,12 +2158,14 @@ static void tuning(){
break; break;
#endif #endif
#if INERTIAL_NAV_XY == ENABLED || INERTIAL_NAV_Z == ENABLED
case CH6_INAV_TC: case CH6_INAV_TC:
#if INERTIAL_NAV_XY == ENABLED
inertial_nav.set_time_constant_xy(tuning_value); inertial_nav.set_time_constant_xy(tuning_value);
inertial_nav.set_time_constant_z(tuning_value);
break;
#endif #endif
#if INERTIAL_NAV_Z == ENABLED
inertial_nav.set_time_constant_z(tuning_value);
#endif
break;
case CH6_THR_ACCEL_KP: case CH6_THR_ACCEL_KP:
g.pid_throttle_accel.kP(tuning_value); g.pid_throttle_accel.kP(tuning_value);