From aea39a1d18e5285de63f43d63ea540a33d50655f Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Tue, 8 Nov 2022 15:23:10 +1100 Subject: [PATCH] AP_OSD: remove GCS.h from library header files --- libraries/AP_OSD/AP_OSD.cpp | 1 + libraries/AP_OSD/AP_OSD.h | 10 ++++++---- libraries/AP_OSD/AP_OSD_Backend.cpp | 1 + libraries/AP_OSD/AP_OSD_MSP_DisplayPort.cpp | 4 +++- libraries/AP_OSD/AP_OSD_ParamScreen.cpp | 1 + libraries/AP_OSD/AP_OSD_ParamSetting.cpp | 1 + 6 files changed, 13 insertions(+), 5 deletions(-) diff --git a/libraries/AP_OSD/AP_OSD.cpp b/libraries/AP_OSD/AP_OSD.cpp index 9a4003aae9..6b44ea5886 100644 --- a/libraries/AP_OSD/AP_OSD.cpp +++ b/libraries/AP_OSD/AP_OSD.cpp @@ -36,6 +36,7 @@ #include #include #include +#include // macro for easy use of var_info2 #define AP_SUBGROUPINFO2(element, name, idx, thisclazz, elclazz) { AP_PARAM_GROUP, idx, name, AP_VAROFFSET(thisclazz, element), { group_info : elclazz::var_info2 }, AP_PARAM_FLAG_NESTED_OFFSET } diff --git a/libraries/AP_OSD/AP_OSD.h b/libraries/AP_OSD/AP_OSD.h index 674d616bc4..25583292fe 100644 --- a/libraries/AP_OSD/AP_OSD.h +++ b/libraries/AP_OSD/AP_OSD.h @@ -22,11 +22,13 @@ #include #include #include -#include +#include #include #include #include +#if HAL_GCS_ENABLED #include +#endif #include #ifndef OSD_ENABLED @@ -410,8 +412,8 @@ public: void draw(void) override; #endif #if HAL_GCS_ENABLED - void handle_write_msg(const mavlink_osd_param_config_t& packet, const GCS_MAVLINK& link); - void handle_read_msg(const mavlink_osd_param_show_config_t& packet, const GCS_MAVLINK& link); + void handle_write_msg(const mavlink_osd_param_config_t& packet, const class GCS_MAVLINK& link); + void handle_read_msg(const mavlink_osd_param_show_config_t& packet, const class GCS_MAVLINK& link); #endif // get a setting and associated metadata AP_OSD_ParamSetting* get_setting(uint8_t param_idx); @@ -595,7 +597,7 @@ public: #endif // handle OSD parameter configuration #if HAL_GCS_ENABLED - void handle_msg(const mavlink_message_t &msg, const GCS_MAVLINK& link); + void handle_msg(const mavlink_message_t &msg, const class GCS_MAVLINK& link); #endif // allow threads to lock against OSD update diff --git a/libraries/AP_OSD/AP_OSD_Backend.cpp b/libraries/AP_OSD/AP_OSD_Backend.cpp index 705a468c9d..df1242968e 100644 --- a/libraries/AP_OSD/AP_OSD_Backend.cpp +++ b/libraries/AP_OSD/AP_OSD_Backend.cpp @@ -16,6 +16,7 @@ #include #include +#include #include extern const AP_HAL::HAL& hal; diff --git a/libraries/AP_OSD/AP_OSD_MSP_DisplayPort.cpp b/libraries/AP_OSD/AP_OSD_MSP_DisplayPort.cpp index 2336e83277..8a9191e8d8 100644 --- a/libraries/AP_OSD/AP_OSD_MSP_DisplayPort.cpp +++ b/libraries/AP_OSD/AP_OSD_MSP_DisplayPort.cpp @@ -22,6 +22,8 @@ #if HAL_WITH_MSP_DISPLAYPORT +#include + static const struct AP_Param::defaults_table_struct defaults_table[] = { /* { "PARAM_NAME", value_float } @@ -131,4 +133,4 @@ AP_OSD_Backend *AP_OSD_MSP_DisplayPort::probe(AP_OSD &osd) } return backend; } -#endif \ No newline at end of file +#endif diff --git a/libraries/AP_OSD/AP_OSD_ParamScreen.cpp b/libraries/AP_OSD/AP_OSD_ParamScreen.cpp index b626296d0d..8b9b5b4934 100644 --- a/libraries/AP_OSD/AP_OSD_ParamScreen.cpp +++ b/libraries/AP_OSD/AP_OSD_ParamScreen.cpp @@ -30,6 +30,7 @@ #include #include #include +#include extern const AP_HAL::HAL& hal; diff --git a/libraries/AP_OSD/AP_OSD_ParamSetting.cpp b/libraries/AP_OSD/AP_OSD_ParamSetting.cpp index a57aca8087..6e012fbcc7 100644 --- a/libraries/AP_OSD/AP_OSD_ParamSetting.cpp +++ b/libraries/AP_OSD/AP_OSD_ParamSetting.cpp @@ -23,6 +23,7 @@ #include "AP_OSD.h" #include +#include #include #include