From 57b291b1c539b5eef0a9e2cb68f6e05b16fdbdd1 Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Thu, 14 Nov 2013 13:49:37 +0900 Subject: [PATCH] Copter: reject change_command if not in AUTO --- ArduCopter/commands_process.pde | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ArduCopter/commands_process.pde b/ArduCopter/commands_process.pde index 52d8c8c5a0..39d846bbd7 100644 --- a/ArduCopter/commands_process.pde +++ b/ArduCopter/commands_process.pde @@ -4,6 +4,11 @@ //---------------------------------------- static void change_command(uint8_t cmd_index) { + // check we are in AUTO mode + if (control_mode != AUTO) { + return; + } + // limit range cmd_index = min(g.command_total - 1, cmd_index);