mirror of https://github.com/ArduPilot/ardupilot
ArduPlane: stop libraries including AP_Logger.h in .h files
AP_Logger.h is a nexus of includes; while this is being improved over time, there's no reason for the library headers to include AP_Logger.h as the logger itself is access by singleton and the structures are in LogStructure.h This necessitated moving The PID_Info structure out of AP_Logger's namespace. This cleans up a pretty nasty bit - that structure is definitely not simply used for logging, but also used to pass pid information around to controllers! There are a lot of patches in here because AP_Logger.h, acting as a nexus, was providing transitive header file inclusion in many (some unlikely!) places.
This commit is contained in:
parent
32cfe70a44
commit
fd4a00a654
|
@ -290,7 +290,7 @@ void GCS_MAVLINK_Plane::send_wind() const
|
|||
}
|
||||
|
||||
// sends a single pid info over the provided channel
|
||||
void GCS_MAVLINK_Plane::send_pid_info(const AP_Logger::PID_Info *pid_info,
|
||||
void GCS_MAVLINK_Plane::send_pid_info(const AP_PIDInfo *pid_info,
|
||||
const uint8_t axis, const float achieved)
|
||||
{
|
||||
if (pid_info == nullptr) {
|
||||
|
@ -322,7 +322,7 @@ void GCS_MAVLINK_Plane::send_pid_tuning()
|
|||
|
||||
const Parameters &g = plane.g;
|
||||
|
||||
const AP_Logger::PID_Info *pid_info;
|
||||
const AP_PIDInfo *pid_info;
|
||||
if (g.gcs_pid_mask & TUNING_BITS_ROLL) {
|
||||
pid_info = &plane.rollController.get_pid_info();
|
||||
#if HAL_QUADPLANE_ENABLED
|
||||
|
|
|
@ -41,7 +41,7 @@ protected:
|
|||
|
||||
private:
|
||||
|
||||
void send_pid_info(const AP_Logger::PID_Info *pid_info, const uint8_t axis, const float achieved);
|
||||
void send_pid_info(const AP_PIDInfo *pid_info, const uint8_t axis, const float achieved);
|
||||
|
||||
void handleMessage(const mavlink_message_t &msg) override;
|
||||
bool handle_guided_request(AP_Mission::Mission_Command &cmd) override;
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
#include <AC_WPNav/AC_Loiter.h>
|
||||
#include <AC_Fence/AC_Fence.h>
|
||||
#include <AC_Avoidance/AC_Avoid.h>
|
||||
#include <AP_Logger/LogStructure.h>
|
||||
#include <AP_Proximity/AP_Proximity.h>
|
||||
#include "qautotune.h"
|
||||
#include "defines.h"
|
||||
|
|
Loading…
Reference in New Issue