From 6a60ff9dc379edcae3a92ee8ab95bd2be20180b8 Mon Sep 17 00:00:00 2001 From: ChristophTobler Date: Mon, 6 Feb 2017 17:02:41 +0100 Subject: [PATCH] fix code style --- src/modules/navigator/navigator_main.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/modules/navigator/navigator_main.cpp b/src/modules/navigator/navigator_main.cpp index a20fac1f92..13e5b65872 100644 --- a/src/modules/navigator/navigator_main.cpp +++ b/src/modules/navigator/navigator_main.cpp @@ -508,9 +508,11 @@ Navigator::task_main() rep->current.loiter_radius = get_loiter_radius(); rep->current.loiter_direction = 1; rep->current.type = position_setpoint_s::SETPOINT_TYPE_TAKEOFF; + if (home_position_valid()) { rep->current.yaw = cmd.param4; rep->previous.valid = true; + } else { rep->current.yaw = get_local_position()->yaw; rep->previous.valid = false;