From f338e6cc790c401e29ff01ea59658729c8666f6b Mon Sep 17 00:00:00 2001 From: Jason Short Date: Sun, 13 Nov 2011 22:59:57 -0800 Subject: [PATCH] fixed bad indexing for setting current mission index --- ArduCopter/commands_process.pde | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ArduCopter/commands_process.pde b/ArduCopter/commands_process.pde index f46f3b616f..5eb0b3c7b9 100644 --- a/ArduCopter/commands_process.pde +++ b/ArduCopter/commands_process.pde @@ -9,9 +9,10 @@ static void change_command(uint8_t cmd_index) if (temp.id > MAV_CMD_NAV_LAST ){ gcs_send_text_P(SEVERITY_LOW,PSTR("error: non-Nav cmd")); } else { + //Serial.printf("APM:New cmd Index: %d\n", cmd_index); command_must_index = NO_COMMAND; next_command.id = NO_COMMAND; - g.command_index = cmd_index - 1; + g.command_index.set_and_save(cmd_index); update_commands(); } }