From 779eb8d7729c0b575e965a41989e0f571fc8b0be Mon Sep 17 00:00:00 2001 From: Corvus Corax Date: Tue, 19 Aug 2014 23:14:46 +0200 Subject: [PATCH] OP-1156 placed Werners positionhold speed offset back in place --- flight/libraries/plans.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/flight/libraries/plans.c b/flight/libraries/plans.c index 0faac2a2a..2d009f9ea 100644 --- a/flight/libraries/plans.c +++ b/flight/libraries/plans.c @@ -127,12 +127,15 @@ void plan_setup_returnToBase() static PiOSDeltatimeConfig landdT; void plan_setup_land() { + float descendspeed; + plan_setup_positionHold(); + FlightModeSettingsLandingVelocityGet(&descendspeed); PathDesiredData pathDesired; PathDesiredGet(&pathDesired); - pathDesired.StartingVelocity = 0.0f; - pathDesired.EndingVelocity = 0.0f; + pathDesired.StartingVelocity = descendspeed; + pathDesired.EndingVelocity = descendspeed; PathDesiredSet(&pathDesired); PIOS_DELTATIME_Init(&landdT, UPDATE_EXPECTED, UPDATE_MIN, UPDATE_MAX, UPDATE_ALPHA); }