Copter: switch to LOITER when exiting mission

This commit is contained in:
Randy Mackay 2013-08-15 13:09:57 +09:00
parent d000967a76
commit b40cd07ce9
1 changed files with 2 additions and 8 deletions

View File

@ -186,16 +186,10 @@ static void exit_mission()
// if we are not on the ground switch to loiter or land
if(!ap.land_complete) {
// If the approach altitude is valid (above 1m), do approach, else land
if(g.rtl_alt_final == 0) {
set_mode(LAND);
}else{
// try to enter loiter but if that fails land
if (!set_mode(LOITER)) {
set_mode(LAND);
}
}
}
}