From 6b6075ed30d7f32ec93f289db08904029146f52b Mon Sep 17 00:00:00 2001 From: Jason Short Date: Wed, 12 Sep 2012 23:02:55 -0700 Subject: [PATCH] ACM l Prevent pre-mature finish of mission --- ArduCopter/commands_process.pde | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ArduCopter/commands_process.pde b/ArduCopter/commands_process.pde index e0d6d49cfc..ed92895cff 100644 --- a/ArduCopter/commands_process.pde +++ b/ArduCopter/commands_process.pde @@ -189,7 +189,7 @@ static void verify_commands(void) static int16_t find_next_nav_index(int16_t search_index) { Location tmp; - while(search_index < g.command_total - 1) { + while(search_index < g.command_total) { tmp = get_cmd_with_index(search_index); if(tmp.id <= MAV_CMD_NAV_LAST) { return search_index; @@ -200,7 +200,6 @@ static int16_t find_next_nav_index(int16_t search_index) return -1; } - static void exit_mission() { // we are out of commands