PX4/Firmware — pull request #1121 by t0ni0 (2014-07-05 01:42:07+00:00)
Title: Commander: Only consider latest active data link heartbeat for timeout.

A quick fix to only consider the latest data link to declare data link as lost.

The reason for this fix is that when permanently having a telemetry radio installed and connecting to QGroundControl via USB, the telemetry_status topic is, I believe, constantly updated with both MAVLink instances. This causes the commander to compare an old/uninitiated heartbeat (from the radio) to the current timestamp, then timing out (losing data link), then checking for USB heartbeat (regaining data link) and so on and so forth... Creating an incessant flood of audio warnings in QGroundControl about losing and regaining data link.

This proposed solution makes it so that only the latest telemetry timestamp is considered to confirm that we have indeed lost/regained data link on the active QGroundControl MAVLink instance. This was tested using a 3DR Radio and Pixhawk with default start-up script on the current master branch.