From 873d7bb5d5d9dc4b19ab612332da708944bb1bc7 Mon Sep 17 00:00:00 2001 From: jasonshort Date: Sun, 15 May 2011 06:04:16 +0000 Subject: [PATCH] updated relative altitude in nav_wp git-svn-id: https://arducopter.googlecode.com/svn/trunk@2284 f9c3cf11-9bcb-44bc-f272-b75c42450872 --- ArduCopterMega/commands_logic.pde | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ArduCopterMega/commands_logic.pde b/ArduCopterMega/commands_logic.pde index c0d8480858..2dfcdf94b2 100644 --- a/ArduCopterMega/commands_logic.pde +++ b/ArduCopterMega/commands_logic.pde @@ -245,10 +245,10 @@ void do_nav_wp() { wp_control = WP_MODE; - // no longer needed as get_command_with_index takes care of this // next_command.alt is a relative altitude!!! - // next_command.alt += home.alt; - + if (next_command.options & WP_OPTION_ALT_RELATIVE) { + next_command.alt += home.alt; + } set_next_WP(&next_command); // this is our bitmask to verify we have met all conditions to move on