diff --git a/libraries/GCS_MAVLink/GCS.h b/libraries/GCS_MAVLink/GCS.h index d3176277be..fbcfda4311 100644 --- a/libraries/GCS_MAVLink/GCS.h +++ b/libraries/GCS_MAVLink/GCS.h @@ -101,9 +101,6 @@ public: virtual void data_stream_send(void) = 0; void queued_param_send(); void queued_waypoint_send(); - void set_snoop(void (*_msg_snoop)(const mavlink_message_t* msg)) { - msg_snoop = _msg_snoop; - } // packetReceived is called on any successful decode of a mavlink message virtual void packetReceived(const mavlink_status_t &status, mavlink_message_t &msg); @@ -425,10 +422,6 @@ private: // send an async parameter reply void send_parameter_reply(void); - - - // a vehicle can optionally snoop on messages for other systems - static void (*msg_snoop)(const mavlink_message_t* msg); virtual bool handle_guided_request(AP_Mission::Mission_Command &cmd) = 0; virtual void handle_change_alt_request(AP_Mission::Mission_Command &cmd) = 0; diff --git a/libraries/GCS_MAVLink/GCS_Common.cpp b/libraries/GCS_MAVLink/GCS_Common.cpp index 44b9f6fca7..54db8d6aaf 100644 --- a/libraries/GCS_MAVLink/GCS_Common.cpp +++ b/libraries/GCS_MAVLink/GCS_Common.cpp @@ -848,10 +848,6 @@ void GCS_MAVLINK::packetReceived(const mavlink_status_t &status, cstatus->flags &= ~MAVLINK_STATUS_FLAG_OUT_MAVLINK1; } } - // if a snoop handler has been setup then use it - if (msg_snoop != nullptr) { - msg_snoop(&msg); - } if (routing.check_and_forward(chan, &msg) && accept_packet(status, msg)) { handleMessage(&msg); diff --git a/libraries/GCS_MAVLink/GCS_MAVLink.cpp b/libraries/GCS_MAVLink/GCS_MAVLink.cpp index 19513e2a32..12f5a753fe 100644 --- a/libraries/GCS_MAVLink/GCS_MAVLink.cpp +++ b/libraries/GCS_MAVLink/GCS_MAVLink.cpp @@ -49,10 +49,6 @@ MAVLink_routing GCS_MAVLINK::routing; // static AP_SerialManager pointer const AP_SerialManager *GCS_MAVLINK::serialmanager_p; -// snoop function for vehicle types that want to see messages for -// other targets -void (*GCS_MAVLINK::msg_snoop)(const mavlink_message_t* msg) = nullptr; - /* lock a channel, preventing use by MAVLink */