Browse Source

Copter: switch to LOITER when exiting mission

master
Randy Mackay 12 years ago
parent
commit
b40cd07ce9
  1. 10
      ArduCopter/commands_process.pde

10
ArduCopter/commands_process.pde

@ -186,16 +186,10 @@ static void exit_mission() @@ -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) {
// try to enter loiter but if that fails land
if (!set_mode(LOITER)) {
set_mode(LAND);
}else{
// try to enter loiter but if that fails land
if (!set_mode(LOITER)) {
set_mode(LAND);
}
}
}
}

Loading…
Cancel
Save