From e7df54ca7517288527cd49f3a5fe40fc1edc663f Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Fri, 24 Jul 2015 20:52:56 +0900 Subject: [PATCH] GCS_MAVLink: static find_by_mavtype method --- libraries/GCS_MAVLink/GCS.h | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/libraries/GCS_MAVLink/GCS.h b/libraries/GCS_MAVLink/GCS.h index f45b740fdf..a9ebbb8ab7 100644 --- a/libraries/GCS_MAVLink/GCS.h +++ b/libraries/GCS_MAVLink/GCS.h @@ -160,6 +160,12 @@ public: */ static void send_to_components(const mavlink_message_t* msg) { routing.send_to_components(msg); } + /* + search for a component in the routing table with given mav_type and retrieve it's sysid, compid and channel + returns if a matching component is found + */ + static bool find_by_mavtype(uint8_t mav_type, uint8_t &sysid, uint8_t &compid, mavlink_channel_t &channel) { return routing.find_by_mavtype(mav_type, sysid, compid, channel); } + private: void handleMessage(mavlink_message_t * msg);