mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-22 07:44:03 -04:00
Tracker: check target of manual control msgs
This commit is contained in:
parent
df827fdb8c
commit
ac158f15e9
@ -810,10 +810,13 @@ mission_failed:
|
||||
mavlink_manual_control_t packet;
|
||||
mavlink_msg_manual_control_decode(msg, &packet);
|
||||
|
||||
if (g.proxy_mode == true && proxy_vehicle.initialised) {
|
||||
// Also proxy it to the remote
|
||||
if (comm_get_txspace(proxy_vehicle.chan) > ((uint16_t)msg->len) + MAVLINK_NUM_NON_PAYLOAD_BYTES)
|
||||
_mavlink_resend_uart(proxy_vehicle.chan, msg);
|
||||
// if the packet is not for us, send onto the vehicle
|
||||
if (mavlink_check_target(packet.target,0)) {
|
||||
if (g.proxy_mode == true && proxy_vehicle.initialised) {
|
||||
if (comm_get_txspace(proxy_vehicle.chan) > ((uint16_t)msg->len) + MAVLINK_NUM_NON_PAYLOAD_BYTES)
|
||||
_mavlink_resend_uart(proxy_vehicle.chan, msg);
|
||||
}
|
||||
break;
|
||||
}
|
||||
if(msg->sysid != g.sysid_my_gcs) break; // Only accept control from our gcs
|
||||
tracking_manual_control(packet);
|
||||
|
Loading…
Reference in New Issue
Block a user