From 283a57054ad440b8fbc22f2ffd07ecc1a78cfafd Mon Sep 17 00:00:00 2001 From: Julian Oes Date: Tue, 29 Oct 2019 08:54:40 +0100 Subject: [PATCH] commander: add missing manual modes We prevent arming when in a "manual" mode with throttle high. However, POSCTL and ALTCTL were missing. --- src/modules/commander/Commander.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/modules/commander/Commander.cpp b/src/modules/commander/Commander.cpp index 466a99af1b..0fd5e12655 100644 --- a/src/modules/commander/Commander.cpp +++ b/src/modules/commander/Commander.cpp @@ -839,7 +839,9 @@ Commander::handle_command(vehicle_status_s *status_local, const vehicle_command_ // Refuse to arm if in manual with non-zero throttle if (cmd_arms - && (status_local->nav_state == vehicle_status_s::NAVIGATION_STATE_MANUAL + && (status_local->nav_state == vehicle_status_s::NAVIGATION_STATE_POSCTL + || status_local->nav_state == vehicle_status_s::NAVIGATION_STATE_ALTCTL + || status_local->nav_state == vehicle_status_s::NAVIGATION_STATE_MANUAL || status_local->nav_state == vehicle_status_s::NAVIGATION_STATE_ACRO || status_local->nav_state == vehicle_status_s::NAVIGATION_STATE_STAB || status_local->nav_state == vehicle_status_s::NAVIGATION_STATE_RATTITUDE)