Skip to content

Commit

Permalink
GCS_MAVLink: revert removal of private channel check when forwarding
Browse files Browse the repository at this point in the history
This reverts 6dc77c9

The commit caused a regression on Solo as the gimbal is "nodding",
indicating traffic from the autopilot is getting through to the gimbal.
  • Loading branch information
peterbarker committed Sep 24, 2020
1 parent 8e6cde2 commit 0c88af9
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions libraries/GCS_MAVLink/MAVLink_routing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,6 +145,13 @@ bool MAVLink_routing::check_and_forward(mavlink_channel_t in_channel, const mavl
memset(sent_to_chan, 0, sizeof(sent_to_chan));
for (uint8_t i=0; i<num_routes; i++) {

// Skip if channel is private and the target system or component IDs do not match
if ((GCS_MAVLINK::is_private(routes[i].channel)) &&
(target_system != routes[i].sysid ||
target_component != routes[i].compid)) {
continue;
}

if (broadcast_system || (target_system == routes[i].sysid &&
(broadcast_component ||
target_component == routes[i].compid ||
Expand Down

0 comments on commit 0c88af9

Please sign in to comment.