Skip to content

Commit

Permalink
Added Inlet Icing BMS 4.35
Browse files Browse the repository at this point in the history
Added FLCS channel lamps indicatios BMS 4.35
Added Gear Handle solenoid status BMS 4.35
  • Loading branch information
Todd1215 committed Dec 23, 2020
1 parent 357c0d8 commit 13bb44e
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 2 deletions.
18 changes: 18 additions & 0 deletions HeliosFalcon/Interfaces/BMS/BMSFalconDataExporter.cs
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,14 @@ public BMSFalconDataExporter(FalconInterface falconInterface)

// ILS with AOA consideration
AddValue("ADI", "ils vertical to flight path", "Position of vertical ils bar with AOA correction.", "(-1 highest, 1 lowest)", BindingValueUnits.Numeric);

// BMS 4.35 additions
AddValue("Caution", "Inlet Icing indicator", "Inlet Icing indicator lamp on the caution panel.", "True if lit", BindingValueUnits.Boolean);
AddValue("Test Panel", "FLCS channel lamp A", "FLCS channel lamp A on test panel (abcd)", "True if lit", BindingValueUnits.Boolean);
AddValue("Test Panel", "FLCS channel lamp B", "FLCS channel lamp B on test panel (abcd)", "True if lit", BindingValueUnits.Boolean);
AddValue("Test Panel", "FLCS channel lamp C", "FLCS channel lamp C on test panel (abcd)", "True if lit", BindingValueUnits.Boolean);
AddValue("Test Panel", "FLCS channel lamp D", "FLCS channel lamp D on test panel (abcd)", "True if lit", BindingValueUnits.Boolean);
AddValue("Gear Handle", "gear handle solenoid", "Landing gear handle solenoid status", "True if engaged.", BindingValueUnits.Boolean);
}

internal override void InitData()
Expand Down Expand Up @@ -367,6 +375,13 @@ private void ProcessMiscBits(MiscBits miscBits, float rALT)

}
SetValue("Altimeter", "radar alt", new BindingValue(rAltString));

//BMS 4.35 additions
SetValue("Test Panel", "FLCS channel lamp A", new BindingValue(miscBits.HasFlag(MiscBits.Flcs_Flcc_A)));
SetValue("Test Panel", "FLCS channel lamp B", new BindingValue(miscBits.HasFlag(MiscBits.Flcs_Flcc_A)));
SetValue("Test Panel", "FLCS channel lamp C", new BindingValue(miscBits.HasFlag(MiscBits.Flcs_Flcc_A)));
SetValue("Test Panel", "FLCS channel lamp D", new BindingValue(miscBits.HasFlag(MiscBits.Flcs_Flcc_A)));
SetValue("Gear Handle", "gear handle solenoid", new BindingValue(miscBits.HasFlag(MiscBits.SolenoidStatus)));
}

private object RoundToNearestTen(int num)
Expand Down Expand Up @@ -544,6 +559,9 @@ protected void ProcessLightBits3(BMSLightBits3 bits)
SetValue("General", "power off", new BindingValue(bits.HasFlag(BMSLightBits3.Power_Off)));

SetValue("Threat Warning Prime", "systest indicator", new BindingValue(bits.HasFlag(BMSLightBits3.SysTest)));

// BMS 4.35 additions
SetValue("Caution", "Inlet Icing indicator", new BindingValue(bits.HasFlag(BMSLightBits3.Inlet_Icing)));
}

protected void ProcessHsiBits(HsiBits bits, float desiredCourse, float bearingToBeacon, BlinkBits blinkBits, int time)
Expand Down
3 changes: 3 additions & 0 deletions HeliosFalcon/Interfaces/BMS/BMSLightBits3.cs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ enum BMSLightBits3 : uint

ATF_Not_Engaged = 0x10000000,

// Caution panel
Inlet_Icing = 0x20000000,

// Used with the MAL/IND light code to light up "everything"
// please update this if you add/change bits!
AllLampBits3On = 0x1147EFFF,
Expand Down
11 changes: 9 additions & 2 deletions HeliosFalcon/Interfaces/BMS/FlightData2.cs
Original file line number Diff line number Diff line change
Expand Up @@ -124,8 +124,15 @@ enum InstrLight : byte
[Flags]
enum MiscBits : uint
{
RALT_Valid = 0x1 // indicates weather the RALT reading is valid/reliable
};
RALT_Valid = 0x01, // indicates weather the RALT reading is valid/reliable
Flcs_Flcc_A = 0x02,
Flcs_Flcc_B = 0x04,
Flcs_Flcc_C = 0x08,
Flcs_Flcc_D = 0x10,
SolenoidStatus = 0x20, //0 not powered or failed or WOW , 1 is working OK

AllLampBitsFlccOn = 0x1e
};

[Serializable]
[StructLayout(LayoutKind.Sequential, Pack = 8)]
Expand Down

0 comments on commit 13bb44e

Please sign in to comment.