From d41c283a5c492f1524547406efc33eb3f87f749d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Sun, 28 Aug 2022 19:03:19 +1000 Subject: [PATCH] GCS_MAVLink: added OpenDroneID support --- libraries/GCS_MAVLink/GCS.h | 1 + libraries/GCS_MAVLink/GCS_Common.cpp | 11 +++++++++++ 2 files changed, 12 insertions(+) diff --git a/libraries/GCS_MAVLink/GCS.h b/libraries/GCS_MAVLink/GCS.h index ee8ebea4ce..34705103e8 100644 --- a/libraries/GCS_MAVLink/GCS.h +++ b/libraries/GCS_MAVLink/GCS.h @@ -16,6 +16,7 @@ #include #include #include +#include #include "MissionItemProtocol_Waypoints.h" #include "MissionItemProtocol_Rally.h" diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 902baa15b4..76ce5efc24 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -3246,6 +3246,17 @@ void GCS_MAVLINK::handle_common_message(const mavlink_message_t &msg) case MAVLINK_MSG_ID_OPTICAL_FLOW: handle_optical_flow(msg); break; + +#if AP_OPENDRONEID_ENABLED + case MAVLINK_MSG_ID_OPEN_DRONE_ID_ARM_STATUS: + case MAVLINK_MSG_ID_OPEN_DRONE_ID_OPERATOR_ID: + case MAVLINK_MSG_ID_OPEN_DRONE_ID_SELF_ID: + case MAVLINK_MSG_ID_OPEN_DRONE_ID_BASIC_ID: + case MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM: + case MAVLINK_MSG_ID_OPEN_DRONE_ID_SYSTEM_UPDATE: + AP::opendroneid().handle_msg(chan, msg); + break; +#endif } }