RTL: Commands.pde

When we are out of commands we land or Loiter at the RTL_Approach_altitude.
This commit is contained in:
Jason Short 2012-07-01 13:33:11 -07:00
parent d58ceb2b09
commit 2ad08fdd98

View File

@ -65,7 +65,12 @@ static void update_commands()
// we will disarm the motors after landing.
} else {
// If the approach altitude is valid (above 1m), do approach, else land
set_mode(((g.rtl_approach_alt >= 1) ? APPROACH : LAND));
if(g.rtl_approach_alt >= 1){
set_mode(LOITER);
set_new_altitude(g.rtl_approach_alt);
}else{
set_mode(LAND);
}
}
}
}