From 0e0f4c86dc34882884b4802e1408a2969e04c0dd Mon Sep 17 00:00:00 2001 From: Iampete1 Date: Fri, 4 Feb 2022 23:29:23 +0000 Subject: [PATCH] AC_AutoTune: print gains on axis completion --- libraries/AC_AutoTune/AC_AutoTune.cpp | 2 ++ libraries/AC_AutoTune/AC_AutoTune.h | 3 +++ 2 files changed, 5 insertions(+) diff --git a/libraries/AC_AutoTune/AC_AutoTune.cpp b/libraries/AC_AutoTune/AC_AutoTune.cpp index cc356aabb0..eb1e13a7fb 100644 --- a/libraries/AC_AutoTune/AC_AutoTune.cpp +++ b/libraries/AC_AutoTune/AC_AutoTune.cpp @@ -454,6 +454,8 @@ void AC_AutoTune::control_attitude() // we've reached the end of a D-up-down PI-up-down tune type cycle next_tune_type(tune_type, true); + report_final_gains(axis); + // advance to the next axis bool complete = false; switch (axis) { diff --git a/libraries/AC_AutoTune/AC_AutoTune.h b/libraries/AC_AutoTune/AC_AutoTune.h index 19f0f51806..6cc7ac16ac 100644 --- a/libraries/AC_AutoTune/AC_AutoTune.h +++ b/libraries/AC_AutoTune/AC_AutoTune.h @@ -174,6 +174,9 @@ protected: // return current axis string const char *axis_string() const; + // report final gains for a given axis to GCS + virtual void report_final_gains(AxisType test_axis) const = 0; + // Functions added for heli autotune // Add additional updating gain functions specific to heli