Skip to content

Commit

Permalink
MAVLink: add support for EFI fuel pressure
Browse files Browse the repository at this point in the history
  • Loading branch information
robertlong13 committed Feb 15, 2023
1 parent 9f339ff commit fdf52e1
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions ExtLibs/ArduPilot/CurrentState.cs
Expand Up @@ -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")]
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit fdf52e1

Please sign in to comment.