Copter: pass alt hold gain to WP_Nav library

This commit is contained in:
Randy Mackay 2013-05-31 21:04:10 +09:00
parent 8c4a7ec094
commit 1722e438d8
2 changed files with 4 additions and 1 deletions

View File

@ -1271,6 +1271,9 @@ static void super_slow_loop()
Log_Write_Data(DATA_AP_STATE, ap.value);
}
// pass latest alt hold kP value to navigation controller
wp_nav.set_althold_kP(g.pi_alt_hold.kP());
// log battery info to the dataflash
if ((g.log_bitmask & MASK_LOG_CURRENT) && motors.armed())
Log_Write_Current();

View File

@ -954,7 +954,7 @@
#endif
// the acceleration used to define the distance-velocity curve
#ifndef ALT_HOLD_ACCEL_MAX
# define ALT_HOLD_ACCEL_MAX 250
# define ALT_HOLD_ACCEL_MAX 250 // if you change this you must also update the duplicate declaration in AC_WPNav.h
#endif
// Throttle Accel control