From cf6d73ec88b9e3ce174858f510c067560e35dcbe Mon Sep 17 00:00:00 2001 From: Jason Short Date: Mon, 9 Jul 2012 13:11:58 -0700 Subject: [PATCH] commands.pde RTL Alt fix to maintain current altitude of we are above our RTL alt for safety. --- ArduCopter/commands.pde | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ArduCopter/commands.pde b/ArduCopter/commands.pde index 466dd47b45..2cdea618e3 100644 --- a/ArduCopter/commands.pde +++ b/ArduCopter/commands.pde @@ -109,6 +109,8 @@ static int32_t get_RTL_alt() { if(g.RTL_altitude <= 0){ return current_loc.alt; + }else if (g.RTL_altitude < current_loc.alt){ + return current_loc.alt; }else{ return g.RTL_altitude; }