From 0d75203d8724db5d7008d85ab7defdee9a35abb5 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Sun, 28 Jul 2013 16:46:33 +0900 Subject: [PATCH] Copter: minor format change to exit_mission function --- ArduCopter/commands_process.pde | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/ArduCopter/commands_process.pde b/ArduCopter/commands_process.pde index e7cda6809f..2954658c57 100644 --- a/ArduCopter/commands_process.pde +++ b/ArduCopter/commands_process.pde @@ -184,14 +184,13 @@ static void exit_mission() // we are out of commands g.command_index = 255; - // if we are on the ground, enter stabilize, else Land - if(ap.land_complete) { - // we will disarm the motors after landing. - }else{ + // 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); }