Skip to content

Commit

Permalink
FlightData: Subscribe to XPDR status on first rx
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholas-inocencio authored and meee1 committed Oct 31, 2024
1 parent 475f822 commit 6390e0d
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions GCSViews/FlightData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6250,9 +6250,16 @@ private void XPDRConnect_btn_Click(object sender, EventArgs e)

private void updateTransponder()
{
static neverConnected = true;
MainV2.comPort.MAV.cs.xpdr_status_pending = false;
if (!MainV2.comPort.MAV.cs.xpdr_status_unavail)
{
if (neverConnected)
{
// subscribe to status message on first connection
MainV2.comPort.doCommand(MAVLink.MAV_CMD.SET_MESSAGE_INTERVAL, (float) MAVLink.MAVLINK_MSG_ID.UAVIONIX_ADSB_OUT_STATUS, (float) 1000000.0, 0, 0, 0, 0, 0);
}

STBY_btn.Enabled = true;
ON_btn.Enabled = true;
ALT_btn.Enabled = true;
Expand Down

0 comments on commit 6390e0d

Please sign in to comment.