From c871aaefb753df4bb3bcb02772fe400ff358765a Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Fri, 3 Feb 2023 09:58:39 +1100 Subject: [PATCH] GCS_MAVLink: avoid using struct Location clang reports this could be a problem when compiling under some EABIs. Remove it from most places as it is just noise, replace with class where we want to avoid including Location.h --- libraries/GCS_MAVLink/GCS.h | 2 +- libraries/GCS_MAVLink/GCS_Common.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/libraries/GCS_MAVLink/GCS.h b/libraries/GCS_MAVLink/GCS.h index 781460b8ceb..237949fa378 100644 --- a/libraries/GCS_MAVLink/GCS.h +++ b/libraries/GCS_MAVLink/GCS.h @@ -993,7 +993,7 @@ private: // we cache the current location and send it even if the AHRS has // no idea where we are: - struct Location global_position_current_loc; + Location global_position_current_loc; uint8_t last_tx_seq; uint16_t send_packet_count; diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 4b462223ccc..039d5ec2d25 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -541,7 +541,7 @@ void GCS_MAVLINK::send_ahrs2() { const AP_AHRS &ahrs = AP::ahrs(); Vector3f euler; - struct Location loc {}; + Location loc {}; // we want one or both of these, use | to avoid short-circuiting: if (ahrs.get_secondary_attitude(euler) | ahrs.get_secondary_position(loc)) {