Commit 206929ab authored by Tomaz Canabrava's avatar Tomaz Canabrava

bitwise and, not boolean and, to check for bitmasks.

Signed-off-by: 's avatarTomaz Canabrava <tomaz.canabrava@intel.com>
parent e34413a4
......@@ -174,7 +174,7 @@ void LinkManager::_addLink(LinkInterface* link)
// Find a mavlink channel to use for this link
for (int i=0; i<32; i++) {
if (!(_mavlinkChannelsUsedBitMask && 1 << i)) {
if (!(_mavlinkChannelsUsedBitMask & 1 << i)) {
mavlink_reset_channel_status(i);
link->_setMavlinkChannel(i);
_mavlinkChannelsUsedBitMask |= i << i;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment