From a1856c5c22d9d7a4fc36db64c93f872a23aa8c17 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 16 Mar 2022 06:48:06 +1100 Subject: [PATCH] Plane: added an arming check for Q_ASSIST_SPEED Q_ASSIST should really be enabled for all non-tailsitter quadplanes. This arming check will help users remember to configure it --- ArduPlane/AP_Arming.cpp | 10 ++++++++++ ArduPlane/quadplane.cpp | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/ArduPlane/AP_Arming.cpp b/ArduPlane/AP_Arming.cpp index bb15c5498c..60d5f7f3b3 100644 --- a/ArduPlane/AP_Arming.cpp +++ b/ArduPlane/AP_Arming.cpp @@ -174,6 +174,16 @@ bool AP_Arming_Plane::quadplane_checks(bool display_failure) } } + /* + Q_ASSIST_SPEED really should be enabled for all quadplanes except tailsitters + */ + if (check_enabled(ARMING_CHECK_PARAMETERS) && + is_zero(plane.quadplane.assist_speed) && + !plane.quadplane.tailsitter.enabled()) { + check_failed(display_failure,"Q_ASSIST_SPEED is not set"); + ret = false; + } + return ret; } #endif // HAL_QUADPLANE_ENABLED diff --git a/ArduPlane/quadplane.cpp b/ArduPlane/quadplane.cpp index 43582fe777..3634c2633f 100644 --- a/ArduPlane/quadplane.cpp +++ b/ArduPlane/quadplane.cpp @@ -103,7 +103,7 @@ const AP_Param::GroupInfo QuadPlane::var_info[] = { // @Param: ASSIST_SPEED // @DisplayName: Quadplane assistance speed - // @Description: This is the speed below which the quad motors will provide stability and lift assistance in fixed wing modes. Zero means no assistance except during transition + // @Description: This is the speed below which the quad motors will provide stability and lift assistance in fixed wing modes. Zero means no assistance except during transition. Note that if this is set to zero then other Q_ASSIST features are also disabled. A higher value will lead to more false positives which can waste battery. A lower value will result in less false positive, but will result in assistance taking longer to trigger. If unsure then set to 3 m/s below the minimum airspeed you will fly at. If you don't have an airspeed sensor then use 5 m/s below the minimum airspeed you fly at. If you want to disable the arming check Q_ASSIST_SPEED then set to -1. // @Units: m/s // @Range: 0 100 // @Increment: 0.1