From 78925d57c28e89e2c8640ba21f34150692fb8d14 Mon Sep 17 00:00:00 2001 From: Jason Short Date: Tue, 10 Jan 2012 23:37:13 -0800 Subject: [PATCH] added set_new_altitude call() --- ArduCopter/events.pde | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/ArduCopter/events.pde b/ArduCopter/events.pde index 6788e4b698..fbb55875a6 100644 --- a/ArduCopter/events.pde +++ b/ArduCopter/events.pde @@ -14,7 +14,8 @@ static void failsafe_on_event() // do_rtl sets the altitude to the current altitude by default set_mode(RTL); // We add an additional 10m to the current altitude - next_WP.alt += 1000; + //next_WP.alt += 1000; + set_new_altitude(target_altitude + 1000); } // 2 = Stay in AUTO and ignore failsafe @@ -24,7 +25,8 @@ static void failsafe_on_event() // do_rtl sets the altitude to the current altitude by default set_mode(RTL); // We add an additional 10m to the current altitude - next_WP.alt += 1000; + //next_WP.alt += 1000; + set_new_altitude(target_altitude + 1000); }else{ // We have no GPS so we must land set_mode(LAND);