From 4e623bd384a98b5933c6212972f361f4ce49aa08 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 31 Aug 2024 12:50:11 +1000 Subject: [PATCH] APM_Control: avoid use of AP_Logger.h in library headers this pulls in many more headers, we should avoid using it whereever we can --- libraries/APM_Control/AP_AutoTune.cpp | 2 +- libraries/APM_Control/AP_AutoTune.h | 1 - 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/libraries/APM_Control/AP_AutoTune.cpp b/libraries/APM_Control/AP_AutoTune.cpp index d1d817cb3d..64d5fab2ee 100644 --- a/libraries/APM_Control/AP_AutoTune.cpp +++ b/libraries/APM_Control/AP_AutoTune.cpp @@ -250,7 +250,7 @@ void AP_AutoTune::update(AP_PIDInfo &pinfo, float scaler, float angle_err_deg) #if HAL_LOGGING_ENABLED if (now - last_log_ms >= 40) { // log at 25Hz - struct log_ATRP pkt = { + const struct log_ATRP pkt { LOG_PACKET_HEADER_INIT(LOG_ATRP_MSG), time_us : AP_HAL::micros64(), type : uint8_t(type), diff --git a/libraries/APM_Control/AP_AutoTune.h b/libraries/APM_Control/AP_AutoTune.h index 72dccd5dd9..a1312bc4c9 100644 --- a/libraries/APM_Control/AP_AutoTune.h +++ b/libraries/APM_Control/AP_AutoTune.h @@ -1,6 +1,5 @@ #pragma once -#include #include #include #include