mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-03-09 08:04:14 -03:00
GCS_MAVLink: handle serial loopback in routing
This commit is contained in:
parent
086f878bdc
commit
2aae594371
@ -92,6 +92,13 @@ routing table.
|
|||||||
*/
|
*/
|
||||||
bool MAVLink_routing::check_and_forward(mavlink_channel_t in_channel, const mavlink_message_t* msg)
|
bool MAVLink_routing::check_and_forward(mavlink_channel_t in_channel, const mavlink_message_t* msg)
|
||||||
{
|
{
|
||||||
|
// handle the case of loopback of our own messages, due to
|
||||||
|
// incorrect serial configuration.
|
||||||
|
if (msg->sysid == mavlink_system.sysid &&
|
||||||
|
msg->compid == mavlink_system.compid) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
// learn new routes
|
// learn new routes
|
||||||
learn_route(in_channel, msg);
|
learn_route(in_channel, msg);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user