From fdf52e1808eafb3443e7a13ad3eb9bc45acc815a Mon Sep 17 00:00:00 2001 From: Bob Long Date: Sun, 1 Jan 2023 11:09:13 -0500 Subject: [PATCH] =?UTF-8?q?=EF=BB=BFMAVLink:=20add=20support=20for=20EFI?= =?UTF-8?q?=20fuel=20pressure?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ExtLibs/ArduPilot/CurrentState.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ExtLibs/ArduPilot/CurrentState.cs b/ExtLibs/ArduPilot/CurrentState.cs index 91febb29f8..bf10aa1759 100644 --- a/ExtLibs/ArduPilot/CurrentState.cs +++ b/ExtLibs/ArduPilot/CurrentState.cs @@ -1940,6 +1940,9 @@ public float ter_alt [GroupText("EFI")] [DisplayText("EFI Fuel Consumed (g)")] public float efi_fuelconsumed { get; private set; } + [GroupText("EFI")] + [DisplayText("EFI Fuel Pressure (kPa)")] + public float efi_fuelpressure { get; private set; } [GroupText("Transponder Status")] [DisplayText("Transponder 1090ES Tx Enabled")] @@ -2488,6 +2491,15 @@ private void Parent_OnPacketReceived(object sender, MAVLink.MAVLinkMessage mavLi efi_rpm = efi.rpm; efi_fuelflow = efi.fuel_flow; efi_fuelconsumed = efi.fuel_consumed; + // A value of exactly zero indicates that fuel pressure is not supported + if (efi.fuel_pressure == 0) + { + efi_fuelpressure = -1; + } + else + { + efi_fuelpressure = efi.fuel_pressure; + } } } break;