protected void ProcessLightBits2(BMSLightBits2 bits, BlinkBits blinkBits, int time) { bool rwrPower = bits.HasFlag(BMSLightBits2.AuxPwr); SetValue("Threat Warning Prime", "handoff indicator", new BindingValue(bits.HasFlag(BMSLightBits2.HandOff))); //SetValue("Threat Warning Prime", "launch indicator", new BindingValue(bits.HasFlag(BMSLightBits2.Launch))); //SetValue("Threat Warning Prime", "prioirty mode indicator", new BindingValue(bits.HasFlag(BMSLightBits2.PriMode))); SetValue("Threat Warning Prime", "open mode indicator", new BindingValue(bits.HasFlag(BMSLightBits2.AuxPwr) && !bits.HasFlag(BMSLightBits2.PriMode))); SetValue("Threat Warning Prime", "naval indicator", new BindingValue(bits.HasFlag(BMSLightBits2.Naval))); //SetValue("Threat Warning Prime", "unknown mode indicator", new BindingValue(bits.HasFlag(BMSLightBits2.Unk))); SetValue("Threat Warning Prime", "target step indicator", new BindingValue(bits.HasFlag(BMSLightBits2.TgtSep))); //SetValue("Aux Threat Warning", "search indicator", new BindingValue(bits.HasFlag(BMSLightBits2.AuxSrch))); SetValue("Aux Threat Warning", "activity indicator", new BindingValue(bits.HasFlag(BMSLightBits2.AuxAct))); SetValue("Aux Threat Warning", "low altitude indicator", new BindingValue(bits.HasFlag(BMSLightBits2.AuxLow))); SetValue("Aux Threat Warning", "power indicator", new BindingValue(bits.HasFlag(BMSLightBits2.AuxPwr))); SetValue("CMDS", "Go", new BindingValue(bits.HasFlag(BMSLightBits2.Go))); SetValue("CMDS", "NoGo", new BindingValue(bits.HasFlag(BMSLightBits2.NoGo))); SetValue("CMDS", "Degr", new BindingValue(bits.HasFlag(BMSLightBits2.Degr))); SetValue("CMDS", "Rdy", new BindingValue(bits.HasFlag(BMSLightBits2.Rdy))); SetValue("CMDS", "ChaffLo", new BindingValue(bits.HasFlag(BMSLightBits2.ChaffLo))); SetValue("CMDS", "FlareLo", new BindingValue(bits.HasFlag(BMSLightBits2.FlareLo))); SetValue("ECM", "power indicator", new BindingValue(bits.HasFlag(BMSLightBits2.EcmPwr))); SetValue("ECM", "fail indicator", new BindingValue(bits.HasFlag(BMSLightBits2.EcmFail))); SetValue("Caution", "forward fuel low indicator", new BindingValue(bits.HasFlag(BMSLightBits2.FwdFuelLow))); SetValue("Caution", "aft fuel low indicator", new BindingValue(bits.HasFlag(BMSLightBits2.AftFuelLow))); SetValue("EPU", "on indicator", new BindingValue(bits.HasFlag(BMSLightBits2.EPUOn))); SetValue("JFS", "run indicator", new BindingValue(bits.HasFlag(BMSLightBits2.JFSOn))); SetValue("Caution", "second engine compressor indicator", new BindingValue(bits.HasFlag(BMSLightBits2.SEC))); SetValue("Caution", "oxygen low indicator", new BindingValue(bits.HasFlag(BMSLightBits2.OXY_LOW))); //SetValue("Caution", "probe heat indicator", new BindingValue(bits.HasFlag(BMSLightBits2.PROBEHEAT))); SetValue("Caution", "seat arm indicator", new BindingValue(bits.HasFlag(BMSLightBits2.SEAT_ARM))); SetValue("Caution", "backup fuel control indicator", new BindingValue(bits.HasFlag(BMSLightBits2.BUC))); SetValue("Caution", "fuel oil hot indicator", new BindingValue(bits.HasFlag(BMSLightBits2.FUEL_OIL_HOT))); SetValue("Caution", "anti skid indicator", new BindingValue(bits.HasFlag(BMSLightBits2.ANTI_SKID))); SetValue("Misc", "tfs engaged indicator", new BindingValue(bits.HasFlag(BMSLightBits2.TFR_ENGAGED))); SetValue("Gear Handle", "handle indicator", new BindingValue(bits.HasFlag(BMSLightBits2.GEARHANDLE))); // TODO This should be under device Landing Gear SetValue("Right Eyebrow", "engine indicator", new BindingValue(bits.HasFlag(BMSLightBits2.ENGINE))); UpdateBlinkingLightState(bits.HasFlag(BMSLightBits2.PROBEHEAT), blinkBits.HasFlag(BlinkBits.PROBEHEAT), ref _probeheatLastTick, ref _probeheatOnState); SetValue("Caution", "probe heat indicator", new BindingValue(_probeheatOnState)); UpdateBlinkingLightState(bits.HasFlag(BMSLightBits2.AuxSrch), blinkBits.HasFlag(BlinkBits.AuxSrch), ref _auxsrchLastTick, ref _auxsrchOnState); SetValue("Aux Threat Warning", "search indicator", new BindingValue(_auxsrchOnState)); UpdateBlinkingLightState(bits.HasFlag(BMSLightBits2.Launch), blinkBits.HasFlag(BlinkBits.Launch), ref _launchLastTick, ref _launchOnState); SetValue("Threat Warning Prime", "launch indicator", new BindingValue(_launchOnState)); UpdateBlinkingLightState(bits.HasFlag(BMSLightBits2.PriMode), blinkBits.HasFlag(BlinkBits.PriMode), ref _primodeLastTick, ref _primodeOnState); SetValue("Threat Warning Prime", "prioirty mode indicator", new BindingValue(_primodeOnState)); UpdateBlinkingLightState(bits.HasFlag(BMSLightBits2.Unk), blinkBits.HasFlag(BlinkBits.Unk), ref _unkLastTick, ref _unkOnState); SetValue("Threat Warning Prime", "unknown mode indicator", new BindingValue(_unkOnState)); }
protected void ProcessHsiBits(HsiBits bits, float desiredCourse, float bearingToBeacon, BlinkBits blinkBits, int time) { SetValue("HSI", "to flag", new BindingValue(bits.HasFlag(HsiBits.ToTrue))); SetValue("HSI", "from flag", new BindingValue(bits.HasFlag(HsiBits.FromTrue))); SetValue("HSI", "ils warning flag", new BindingValue(bits.HasFlag(HsiBits.IlsWarning))); SetValue("HSI", "course warning flag", new BindingValue(bits.HasFlag(HsiBits.CourseWarning))); SetValue("HSI", "off flag", new BindingValue(bits.HasFlag(HsiBits.HSI_OFF))); SetValue("HSI", "init flag", new BindingValue(bits.HasFlag(HsiBits.Init))); SetValue("ADI", "off flag", new BindingValue(bits.HasFlag(HsiBits.ADI_OFF))); SetValue("ADI", "aux flag", new BindingValue(bits.HasFlag(HsiBits.ADI_AUX))); SetValue("ADI", "gs flag", new BindingValue(bits.HasFlag(HsiBits.ADI_GS))); SetValue("ADI", "loc flag", new BindingValue(bits.HasFlag(HsiBits.ADI_LOC))); SetValue("Backup ADI", "off flag", new BindingValue(bits.HasFlag(HsiBits.BUP_ADI_OFF))); SetValue("VVI", "off flag", new BindingValue(bits.HasFlag(HsiBits.VVI))); SetValue("AOA", "off flag", new BindingValue(bits.HasFlag(HsiBits.AOA))); SetValue("AVTR", "avtr indicator", new BindingValue(bits.HasFlag(HsiBits.AVTR))); UpdateBlinkingLightState(bits.HasFlag(HsiBits.OuterMarker), blinkBits.HasFlag(BlinkBits.OuterMarker), ref _outerMarkerLastTick, ref _outerMarkerOnState); SetValue("HSI", "Outer marker indicator", new BindingValue(_outerMarkerOnState)); UpdateBlinkingLightState(bits.HasFlag(HsiBits.MiddleMarker), blinkBits.HasFlag(BlinkBits.MiddleMarker), ref _middleMarkerLastTick, ref _middleMarkerOnState); SetValue("HSI", "Middle marker indicator", new BindingValue(_middleMarkerOnState)); }