diff --git a/libraries/AP_SerialManager/AP_SerialManager.cpp b/libraries/AP_SerialManager/AP_SerialManager.cpp index 2b9876981b..4b6d12f92b 100644 --- a/libraries/AP_SerialManager/AP_SerialManager.cpp +++ b/libraries/AP_SerialManager/AP_SerialManager.cpp @@ -643,22 +643,6 @@ int8_t AP_SerialManager::find_portnum(enum SerialProtocol protocol, uint8_t inst return int8_t(_state - &state[0]); } -// get_mavlink_channel - provides the mavlink channel associated with a given protocol -// instance should be zero if searching for the first instance, 1 for the second, etc -// returns true if a channel is found, false if not -bool AP_SerialManager::get_mavlink_channel(enum SerialProtocol protocol, uint8_t instance, mavlink_channel_t &mav_chan) const -{ - // check for MAVLink - if (protocol_match(protocol, SerialProtocol_MAVLink)) { - if (instance < MAVLINK_COMM_NUM_BUFFERS) { - mav_chan = (mavlink_channel_t)(MAVLINK_COMM_0 + instance); - return true; - } - } - // report failure - return false; -} - // should_forward_mavlink_telemetry - returns true if this port should forward telemetry bool AP_SerialManager::should_forward_mavlink_telemetry(enum SerialProtocol protocol, uint8_t instance) const { diff --git a/libraries/AP_SerialManager/AP_SerialManager.h b/libraries/AP_SerialManager/AP_SerialManager.h index 65bc69e363..eac746d0a1 100644 --- a/libraries/AP_SerialManager/AP_SerialManager.h +++ b/libraries/AP_SerialManager/AP_SerialManager.h @@ -201,11 +201,6 @@ public: // find_portnum - find port number (SERIALn index) for a protocol and instance, -1 for not found int8_t find_portnum(enum SerialProtocol protocol, uint8_t instance) const; - // get_mavlink_channel - provides the mavlink channel associated with a given protocol (and instance) - // instance should be zero if searching for the first instance, 1 for the second, etc - // returns true if a channel is found, false if not - bool get_mavlink_channel(enum SerialProtocol protocol, uint8_t instance, mavlink_channel_t &mav_chan) const; - // should_forward_mavlink_telemetry - returns true if this port should forward telemetry bool should_forward_mavlink_telemetry(enum SerialProtocol protocol, uint8_t instance) const;