Skip to content

Commit

Permalink
Merge 0194d04 into 93abb85
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholas-inocencio authored Sep 7, 2021
2 parents 93abb85 + 0194d04 commit 4722a26
Show file tree
Hide file tree
Showing 8 changed files with 1,831 additions and 365 deletions.
22 changes: 11 additions & 11 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,18 +24,18 @@ packages/
/Drivers/DriverCleanup.exe.config
/Drivers/DriverCleanup.exe
/objcore
*.diagsession
/ExtLibs/WindowsStore/BundleArtifacts
/ExtLibs/runtime
/ExtLibs/Xamarin/Xamarin.Android/.__override__
/ExtLibs/UsbSerialForAndroid/usb-serial-for-android-3.2.0
/ExtLibs/UsbSerialForAndroid/usb-serial-for-android-3.3.0
/ExtLibs/Xamarin/opentk
*.diagsession
/ExtLibs/WindowsStore/BundleArtifacts
/ExtLibs/runtime
/ExtLibs/Xamarin/Xamarin.Android/.__override__
/ExtLibs/UsbSerialForAndroid/usb-serial-for-android-3.2.0
/ExtLibs/UsbSerialForAndroid/usb-serial-for-android-3.3.0
/ExtLibs/Xamarin/opentk
*.binlog
docs/
*.Test/
*.jar
*.cache
/Plugins/Dowding/server/node_modules
/Plugins/Dowding/server/package-lock.json
/ExtLibs/Tests
*.cache
/Plugins/Dowding/server/node_modules
/Plugins/Dowding/server/package-lock.json
/ExtLibs/Tests
88 changes: 88 additions & 0 deletions ExtLibs/ArduPilot/CurrentState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1798,6 +1798,65 @@ public float ter_alt
[DisplayText("EFI Fuel Consumed (g)")]
public float efi_fuelconsumed { get; private set; }

[GroupText("Transponder Status")]
[DisplayText("Transponder 1090ES Tx Enabled")]
public bool xpdr_es1090_tx_enabled { get; private set; }
[GroupText("Transponder Status")]
[DisplayText("Transponder Mode S Reply Enabled")]
public bool xpdr_mode_S_enabled { get; private set; }
[GroupText("Transponder Status")]
[DisplayText("Transponder Mode C Reply Enabled")]
public bool xpdr_mode_C_enabled { get; private set; }
[GroupText("Transponder Status")]
[DisplayText("Transponder Mode A Reply Enabled")]
public bool xpdr_mode_A_enabled { get; private set; }
[GroupText("Transponder Status")]
[DisplayText("Ident Active")]
public bool xpdr_ident_active { get; private set; }
[GroupText("Transponder Status")]
[DisplayText("X-bit Status")]
public bool xpdr_x_bit_status { get; private set; }
[GroupText("Transponder Status")]
[DisplayText("Interrogated since last")]
public bool xpdr_interrogated_since_last { get; private set; }
[GroupText("Transponder Status")]
[DisplayText("Airborne")]
public bool xpdr_airborne_status { get; private set; }
[GroupText("Transponder Status")]
[DisplayText("Transponder Mode A squawk code")]
public ushort xpdr_mode_A_squawk_code { get; private set; }
[GroupText("Transponder Status")]
[DisplayText("NIC")]
public byte xpdr_nic { get; private set; }
[GroupText("Transponder Status")]
[DisplayText("NACp")]
public byte xpdr_nacp { get; private set; }
[GroupText("Transponder Status")]
[DisplayText("Board Temperature in C")]
public byte xpdr_board_temperature { get; private set; }
[GroupText("Transponder Status")]
[DisplayText("Maintainence Required")]
public bool xpdr_maint_req { get; private set; }
[GroupText("Transponder Status")]
[DisplayText("ADSB Tx System Failure")]
public bool xpdr_adsb_tx_sys_fail { get; private set; }
[GroupText("Transponder Status")]
[DisplayText("GPS Unavailable")]
public bool xpdr_gps_unavail { get; private set; }
[GroupText("Transponder Status")]
[DisplayText("GPS No Fix")]
public bool xpdr_gps_no_fix { get; private set; }
[GroupText("Transponder Status")]
[DisplayText("Ping200X No Status Message Recieved")]
public bool xpdr_status_unavail { get; private set; }
[GroupText("Transponder Status")]
[DisplayText("Status Update Pending")]
public bool xpdr_status_pending { get; set; }
[GroupText("Transponder Status")]
[DisplayText("Callsign/Flight ID")]
public byte[] xpdr_flight_id { get; set; }


public object Clone()
{
return MemberwiseClone();
Expand Down Expand Up @@ -3311,6 +3370,35 @@ private void Parent_OnPacketReceived(object sender, MAVLink.MAVLinkMessage mavLi

}
break;
case (uint) MAVLink.MAVLINK_MSG_ID.UAVIONIX_ADSB_OUT_STATUS:
{
var status = mavLinkMessage.ToStructure<MAVLink.mavlink_uavionix_adsb_out_status_t>();

xpdr_es1090_tx_enabled = (status.state & 128) != 0;
xpdr_mode_S_enabled = (status.state & 64) != 0 ;
xpdr_mode_C_enabled = (status.state & 32) != 0;
xpdr_mode_A_enabled = (status.state & 16) != 0;
xpdr_ident_active = (status.state & 8) != 0;
xpdr_x_bit_status = (status.state & 4) != 0;
xpdr_interrogated_since_last = (status.state & 2) != 0;
xpdr_airborne_status = (status.state & 1) != 0;

xpdr_mode_A_squawk_code = status.squawk;
xpdr_nic = (byte)(status.NIC_NACp & 0x0F);
xpdr_nacp = (byte)((status.NIC_NACp >> 4) & 0x0F);
xpdr_board_temperature = status.boardTemp;

xpdr_maint_req = (status.fault & 128) != 0;
xpdr_adsb_tx_sys_fail = (status.fault & 64) != 0;
xpdr_gps_unavail = (status.fault & 32) != 0;
xpdr_gps_no_fix = (status.fault & 16) != 0;
xpdr_status_unavail = (status.fault & 8) != 0;

xpdr_flight_id = status.flight_id;

xpdr_status_pending = true;
}
break;
}
}
}
Expand Down
12 changes: 12 additions & 0 deletions ExtLibs/ArduPilot/Mavlink/MAVLinkInterface.cs
Original file line number Diff line number Diff line change
Expand Up @@ -6373,5 +6373,17 @@ public void Dispose()
logreadmode = false;
logplaybackfile = null;
}

public void uAvionixADSBControl(int baroAltMSL,ushort squawk,/*UAVIONIX_ADSB_OUT_CONTROL_STATE*/byte state,/*UAVIONIX_ADSB_EMERGENCY_STATUS*/byte emergencyStatus,byte[] flight_id,byte x_bit)
{
mavlink_uavionix_adsb_out_control_t ctrl = new mavlink_uavionix_adsb_out_control_t();
ctrl.state = state;
ctrl.baroAltMSL = baroAltMSL;
ctrl.squawk = squawk;
ctrl.emergencyStatus = emergencyStatus;
ctrl.flight_id = flight_id;
ctrl.x_bit = x_bit;
generatePacket(MAVLINK_MSG_ID.UAVIONIX_ADSB_OUT_CONTROL, ctrl);
}
}
}
Loading

0 comments on commit 4722a26

Please sign in to comment.