From 20f641de9979c5025306185815c419077bdfe2e4 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sat, 14 May 2022 13:23:25 +1000 Subject: [PATCH] Plane: refuse arming if we are in a landing sequence this helps when the aircraft has gone into a landing sequence due to a failsafe before it is armed. Arming while in the landing sequence is very unlikely to be what the user wants --- ArduPlane/AP_Arming.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ArduPlane/AP_Arming.cpp b/ArduPlane/AP_Arming.cpp index df97ad5ec3..1dd60ba43a 100644 --- a/ArduPlane/AP_Arming.cpp +++ b/ArduPlane/AP_Arming.cpp @@ -102,6 +102,11 @@ bool AP_Arming_Plane::pre_arm_checks(bool display_failure) } } + if (plane.mission.get_in_landing_sequence_flag()) { + check_failed(display_failure,"In landing sequence"); + ret = false; + } + return ret; }