commands.pde RTL Alt

fix to maintain current altitude of we are above our RTL alt for safety.
This commit is contained in:
Jason Short 2012-07-09 13:11:58 -07:00
parent 038116f521
commit cf6d73ec88
1 changed files with 2 additions and 0 deletions

View File

@ -109,6 +109,8 @@ static int32_t get_RTL_alt()
{ {
if(g.RTL_altitude <= 0){ if(g.RTL_altitude <= 0){
return current_loc.alt; return current_loc.alt;
}else if (g.RTL_altitude < current_loc.alt){
return current_loc.alt;
}else{ }else{
return g.RTL_altitude; return g.RTL_altitude;
} }