From 94353a9d408e72aa1eff6f1ba3240c7810eca2b5 Mon Sep 17 00:00:00 2001 From: Lorenz Meier Date: Thu, 25 Feb 2016 14:12:08 +0100 Subject: [PATCH] Commander: Allow arming in MANUAL, STAB, ACRO, ALTCTL --- src/modules/commander/commander.cpp | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/modules/commander/commander.cpp b/src/modules/commander/commander.cpp index c710023bc5..39b8dfdf2f 100644 --- a/src/modules/commander/commander.cpp +++ b/src/modules/commander/commander.cpp @@ -2284,9 +2284,11 @@ int commander_thread_main(int argc, char *argv[]) * the system can be armed in auto if armed via the GCS. */ - if ((status.main_state != vehicle_status_s::MAIN_STATE_MANUAL) && - (status.main_state != vehicle_status_s::MAIN_STATE_STAB)) { - print_reject_arm("NOT ARMING: Switch to MANUAL mode first."); + if ((status.main_state != vehicle_status_s::MAIN_STATE_MANUAL) + && (status.main_state != vehicle_status_s::MAIN_STATE_ACRO) + && (status.main_state != vehicle_status_s::MAIN_STATE_STAB) + && (status.main_state != vehicle_status_s::MAIN_STATE_ALTCTL)) { + print_reject_arm("NOT ARMING: Switch to a manual mode first."); } else if (!status.condition_home_position_valid && geofence_action == geofence_result_s::GF_ACTION_RTL) {