From fbb060140867636acbfe91a8f6be3ab967559672 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 19 Sep 2023 19:51:43 +1000 Subject: [PATCH] Plane: use AP_TUNING_ENABLED --- ArduPlane/Parameters.cpp | 2 ++ ArduPlane/tuning.cpp | 5 +++++ ArduPlane/tuning.h | 8 ++++++++ 3 files changed, 15 insertions(+) diff --git a/ArduPlane/Parameters.cpp b/ArduPlane/Parameters.cpp index 73f0d4a65a..b0cddc9081 100644 --- a/ArduPlane/Parameters.cpp +++ b/ArduPlane/Parameters.cpp @@ -800,9 +800,11 @@ const AP_Param::Info Plane::var_info[] = { GOBJECT(quadplane, "Q_", QuadPlane), #endif +#if AP_TUNING_ENABLED // @Group: TUNE_ // @Path: tuning.cpp,../libraries/AP_Tuning/AP_Tuning.cpp GOBJECT(tuning, "TUNE_", AP_Tuning_Plane), +#endif #if HAL_QUADPLANE_ENABLED // @Group: Q_A_ diff --git a/ArduPlane/tuning.cpp b/ArduPlane/tuning.cpp index 2218a11ab0..308b1c029a 100644 --- a/ArduPlane/tuning.cpp +++ b/ArduPlane/tuning.cpp @@ -1,3 +1,7 @@ +#include + +#if AP_TUNING_ENABLED + #include "Plane.h" /* @@ -305,3 +309,4 @@ void AP_Tuning_Plane::reload_value(uint8_t parm) } } +#endif // AP_TUNING_ENABLED diff --git a/ArduPlane/tuning.h b/ArduPlane/tuning.h index 0a005f7daf..c6b033f628 100644 --- a/ArduPlane/tuning.h +++ b/ArduPlane/tuning.h @@ -1,3 +1,9 @@ +#pragma once + +#include + +#if AP_TUNING_ENABLED + #include /* @@ -108,3 +114,5 @@ private: // mask of what params have been set uint64_t have_set; }; + +#endif // AP_TUNING_ENABLED