From bcd5129f9b173d9c6b212e69d440582e7f04ee4e Mon Sep 17 00:00:00 2001 From: Jason Short Date: Sun, 19 Feb 2012 12:40:08 -0800 Subject: [PATCH] added workaround for resetting alt. --- ArduCopter/navigation.pde | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ArduCopter/navigation.pde b/ArduCopter/navigation.pde index d7e9ce933c..2afa10bd34 100644 --- a/ArduCopter/navigation.pde +++ b/ArduCopter/navigation.pde @@ -326,6 +326,13 @@ static void clear_new_altitude() static void set_new_altitude(int32_t _new_alt) { + if(_new_alt == current_loc.alt){ + next_WP.alt = _new_alt; + target_altitude = _new_alt; + alt_change_flag = REACHED_ALT; + return; + } + // just to be clear next_WP.alt = current_loc.alt;