From 48c211e055661edf6ede111bdb24feb4ec30e0e4 Mon Sep 17 00:00:00 2001 From: Jason Short Date: Sat, 7 Jan 2012 22:27:16 -0800 Subject: [PATCH] Added finish to missions - auto-land or stabilize --- ArduCopter/commands_process.pde | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ArduCopter/commands_process.pde b/ArduCopter/commands_process.pde index 3073891416..4777178db2 100644 --- a/ArduCopter/commands_process.pde +++ b/ArduCopter/commands_process.pde @@ -58,7 +58,14 @@ static void update_commands() command_nav_queue.id = NO_COMMAND; } }else{ + // we are out of commands g.command_index = command_nav_index = 255; + // if we are on the ground, enter stabilize, else Land + if (land_complete == true){ + set_mode(STABILIZE); + } else { + set_mode(LAND); + } } }