From 39df609235bbd139a125e70fc0af8c94c7ba1d7c Mon Sep 17 00:00:00 2001 From: Holger Steinhaus Date: Thu, 13 Mar 2014 18:29:38 +0100 Subject: [PATCH] Copter: fixed vertical speed init for ALT_HOLD mode --- ArduCopter/control_althold.pde | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/ArduCopter/control_althold.pde b/ArduCopter/control_althold.pde index 7aa90112b21..1fc9b77c386 100644 --- a/ArduCopter/control_althold.pde +++ b/ArduCopter/control_althold.pde @@ -9,6 +9,10 @@ static bool althold_init(bool ignore_checks) { // initialise altitude target to stopping point pos_control.set_target_to_stopping_point_z(); + + // initialize vertical speeds and leash lengths + pos_control.set_speed_z(-g.pilot_velocity_z_max, g.pilot_velocity_z_max); + return true; }