From 3e62b188a16bbef8fdc6bc55f2386faeb4b176dd Mon Sep 17 00:00:00 2001 From: Randy Mackay Date: Mon, 29 Sep 2014 21:03:26 +0900 Subject: [PATCH] Tracker: process mavlink msgs from vehicle once previously heartbeat messages from the vehicle could be processed twice. Once at the top of hte handleMessage function where they were forwarded onto the GCS and then again lower down in the function where all received heartbeats were sent to the vehicle. --- AntennaTracker/GCS_Mavlink.pde | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/AntennaTracker/GCS_Mavlink.pde b/AntennaTracker/GCS_Mavlink.pde index 899ad7e5e7..936996ab12 100644 --- a/AntennaTracker/GCS_Mavlink.pde +++ b/AntennaTracker/GCS_Mavlink.pde @@ -434,10 +434,7 @@ GCS_MAVLINK::data_stream_send(void) void GCS_MAVLINK::handleMessage(mavlink_message_t* msg) { - if (g.proxy_mode == true) - { - if (chan == proxy_vehicle.chan) - { + if (g.proxy_mode == true && chan == proxy_vehicle.chan) { // From the remote vehicle. // All messages from the remote are proxied to GCS // We also eavesdrop on MAVLINK_MSG_ID_GLOBAL_POSITION_INT and MAVLINK_MSG_ID_SCALED_PRESSUREs @@ -472,9 +469,8 @@ void GCS_MAVLINK::handleMessage(mavlink_message_t* msg) } } } - } - // Else its from the GCS, and it might be for the remote and.or it might be for the tracker - // So we fall through to the below + // no further processing of messages from vehicle + return; }