GCS_MAVLink: learn routes even on private channels

Co-authored-by: Peter Barker <pbarker@barker.dropbear.id.au>
This commit is contained in:
Randy Mackay 2022-06-03 15:17:48 +09:00 committed by Peter Barker
parent 19063a46a0
commit 8c19af72e0

View File

@ -97,14 +97,15 @@ bool MAVLink_routing::check_and_forward(mavlink_channel_t in_channel, const mavl
return true;
}
// learn new routes including private channels
// so that find_mav_type works for all channels
learn_route(in_channel, msg);
// don't ever forward data from a private channel
if ((GCS_MAVLINK::is_private(in_channel))) {
return true;
}
// learn new routes
learn_route(in_channel, msg);
if (msg.msgid == MAVLINK_MSG_ID_RADIO ||
msg.msgid == MAVLINK_MSG_ID_RADIO_STATUS) {
// don't forward RADIO packets