From 954588e0e0062ec789b8b2b095660922af179f1f Mon Sep 17 00:00:00 2001 From: Don Gagne Date: Fri, 15 Feb 2019 15:04:49 -0800 Subject: [PATCH] USe correct number of available channels --- src/comm/LinkManager.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/comm/LinkManager.cc b/src/comm/LinkManager.cc index 957af8c64..43e46a8c5 100644 --- a/src/comm/LinkManager.cc +++ b/src/comm/LinkManager.cc @@ -994,7 +994,7 @@ void LinkManager::startAutoConnectedLinks(void) int LinkManager::_reserveMavlinkChannel(void) { // Find a mavlink channel to use for this link, Channel 0 is reserved for internal use. - for (uint8_t mavlinkChannel = 1; mavlinkChannel < 32; mavlinkChannel++) { + for (uint8_t mavlinkChannel = 1; mavlinkChannel < MAVLINK_COMM_NUM_BUFFERS; mavlinkChannel++) { if (!(_mavlinkChannelsUsedBitMask & 1 << mavlinkChannel)) { mavlink_reset_channel_status(mavlinkChannel); // Start the channel on Mav 1 protocol -- 2.22.0