From 62ac11666921bb504460b9b9bed1cb9ec3f89a84 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 14 Jul 2023 10:58:08 +1000 Subject: [PATCH] AP_Tuning: allow compilation with HAL_LOGGING_ENABLED false --- libraries/AP_Tuning/AP_Tuning.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/libraries/AP_Tuning/AP_Tuning.cpp b/libraries/AP_Tuning/AP_Tuning.cpp index b07aec2d8e..490416fdab 100644 --- a/libraries/AP_Tuning/AP_Tuning.cpp +++ b/libraries/AP_Tuning/AP_Tuning.cpp @@ -227,10 +227,14 @@ void AP_Tuning::check_input(uint8_t flightmode) changed = true; need_revert |= (1U << current_parm_index); set_value(current_parm, new_value); + +#if HAL_LOGGING_ENABLED Log_Write_Parameter_Tuning(new_value); +#endif } +#if HAL_LOGGING_ENABLED /* log a tuning change */ @@ -250,6 +254,7 @@ void AP_Tuning::Log_Write_Parameter_Tuning(float value) (double)value, (double)center_value); } +#endif /* save parameters in the set