AP_Tuning: allow compilation with HAL_LOGGING_ENABLED false

This commit is contained in:
Peter Barker 2023-07-14 10:58:08 +10:00 committed by Andrew Tridgell
parent 6c10b38442
commit 62ac116669

View File

@ -227,10 +227,14 @@ void AP_Tuning::check_input(uint8_t flightmode)
changed = true; changed = true;
need_revert |= (1U << current_parm_index); need_revert |= (1U << current_parm_index);
set_value(current_parm, new_value); set_value(current_parm, new_value);
#if HAL_LOGGING_ENABLED
Log_Write_Parameter_Tuning(new_value); Log_Write_Parameter_Tuning(new_value);
#endif
} }
#if HAL_LOGGING_ENABLED
/* /*
log a tuning change log a tuning change
*/ */
@ -250,6 +254,7 @@ void AP_Tuning::Log_Write_Parameter_Tuning(float value)
(double)value, (double)value,
(double)center_value); (double)center_value);
} }
#endif
/* /*
save parameters in the set save parameters in the set