From 022c567b4781e861569a36cd685895fef6781448 Mon Sep 17 00:00:00 2001 From: Jason Short Date: Thu, 9 Aug 2012 16:50:20 -0700 Subject: [PATCH] ACM : Events - renamed target alt --- ArduCopter/events.pde | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ArduCopter/events.pde b/ArduCopter/events.pde index 1f31a298f3..cb1644bd72 100644 --- a/ArduCopter/events.pde +++ b/ArduCopter/events.pde @@ -15,9 +15,10 @@ static void failsafe_on_event() set_mode(RTL); // We add an additional 10m to the current altitude //next_WP.alt += 1000; - set_new_altitude(target_altitude + 1000); + set_new_altitude(next_WP.alt + 1000); } - // 2 = Stay in AUTO and ignore failsafe + //if (g.throttle_fs_action == 2) + // Stay in AUTO and ignore failsafe break; default: @@ -27,7 +28,7 @@ static void failsafe_on_event() set_mode(RTL); // We add an additional 10m to the current altitude //next_WP.alt += 1000; - set_new_altitude(target_altitude + 1000); + set_new_altitude(next_WP.alt + 1000); }else{ // We have no GPS so we must land set_mode(LAND);