From 35ef20b23a3ebf7695ef07ab253a0298fa1c7981 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 8 May 2016 15:57:22 +1000 Subject: [PATCH] Plane: use separate definition for TUNE_PARM this allows the parameter docs to be separated --- ArduPlane/Parameters.cpp | 2 +- ArduPlane/tuning.cpp | 19 +++++++++++++++++++ ArduPlane/tuning.h | 2 ++ 3 files changed, 22 insertions(+), 1 deletion(-) diff --git a/ArduPlane/Parameters.cpp b/ArduPlane/Parameters.cpp index f8afa4068b..c4edd43604 100644 --- a/ArduPlane/Parameters.cpp +++ b/ArduPlane/Parameters.cpp @@ -1116,7 +1116,7 @@ const AP_Param::Info Plane::var_info[] = { GOBJECT(quadplane, "Q_", QuadPlane), // @Group: TUNE_ - // @Path: tuning.cpp + // @Path: tuning.cpp,../libraries/AP_Tuning/AP_Tuning.cpp GOBJECT(tuning, "TUNE_", AP_Tuning_Plane), // @Group: Q_A_ diff --git a/ArduPlane/tuning.cpp b/ArduPlane/tuning.cpp index c6439c3fa5..b22acb4800 100644 --- a/ArduPlane/tuning.cpp +++ b/ArduPlane/tuning.cpp @@ -2,6 +2,25 @@ #include "Plane.h" +/* + the vehicle class has its own var table for TUNE_PARAM so it can + have separate parameter docs for the list of available parameters + */ +const AP_Param::GroupInfo AP_Tuning_Plane::var_info[] = { + // @Param: PARAM + // @DisplayName: Transmitter tuning parameter or set of parameters + // @Description: This sets which parameter or set of parameters will be tuned. Values greater than 100 indicate a set of parameters rather than a single parameter. Parameters less than 50 are for QuadPlane vertical lift motors only. + // @Values: 0:None,1:RateRollPI,2:RateRollP,3:RateRollI,4:RateRollD,5:RatePitchPI,6:RatePitchP,7:RatePitchI,8:RatePitchD,9:RateYawPI,10:RateYawP,11:RateYawI,12:RateYawD,13:AngleRollP,14:AnglePitchP,15:AngleYawP,16:PosXYP,17:PosZP,18:VelXYP,19:VelXYI,20:VelZP,21:AccelZP,22:AccelZI,23:AccelZD,50:FixedWingRollP,51:FixedWingRollI,52:FixedWingRollD,53:FixedWingRollFF,54:FixedWingPitchP,55:FixedWingPitchI,56:FixedWingPitchD,57:FixedWingPitchFF + // @User: Standard + AP_GROUPINFO("PARAM", 1, AP_Tuning_Plane, parmset, 0), + + // the rest of the parameters are from AP_Tuning + AP_NESTEDGROUPINFO(AP_Tuning, 0), + + AP_GROUPEND +}; + + /* tables of tuning sets */ diff --git a/ArduPlane/tuning.h b/ArduPlane/tuning.h index 677bac3643..8ecba1587f 100644 --- a/ArduPlane/tuning.h +++ b/ArduPlane/tuning.h @@ -17,6 +17,8 @@ private: public: // constructor AP_Tuning_Plane(void) : AP_Tuning(tuning_sets, tuning_names) {} + + static const struct AP_Param::GroupInfo var_info[]; private: