Exemple #1
0
        protected override void OnFlightDataChanged(object sender, FlightDataChangedEventArgs e)
        {
            bool?oldValue = getValue(e.oldFlightData);
            bool?newValue = getValue(e.newFlightData);

            if (newValue == true)
            {
                Engaged = 1;
            }
            else
            {
                Engaged = 0;
            }
            //   if (EmergBusPwr == true)
            //   {

            if (oldValue != newValue && newValue == true)
            {
                timer.Stop();
                raiseFalconLightChanged(oldValue, newValue);
                timer.Start();
            }
            // }
            // else { }
        }
Exemple #2
0
        private void OnFlightDataChanged(object sender, FlightDataChangedEventArgs e)
        {
            float?oldValue = getValue(e.oldFlightData);
            float?newValue = getValue(e.newFlightData);

            if (oldValue != newValue)
            {
                raiseFalconLightChanged(newValue);
            }
        }
Exemple #3
0
        protected override void OnFlightDataChanged(object sender, FlightDataChangedEventArgs e)
        {
            bool?oldValue = getValue(e.oldFlightData);
            bool?newValue = getValue(e.newFlightData);

            if (oldValue != newValue)
            {
                raiseFalconLightChanged(oldValue, newValue);
            }
        }
        private void OnFlightDataChanged(object sender, FlightDataChangedEventArgs e)
        {
            uint?oldValue = getValue(e.oldFlightData);
            uint?newValue = getValue(e.newFlightData);

            if (oldValue != newValue)
            {
                raiseMemorySlotChanged(newValue);
            }
        }
Exemple #5
0
        protected override void OnFlightDataChanged(object sender, FlightDataChangedEventArgs e)
        {
            bool?oldValue = getValue(e.oldFlightData);
            bool?newValue = getValue(e.newFlightData);

            if (newValue == true)
            {
                LightBitSet = true;
            }
            else
            {
                LightBitSet = false;
            }
            if (e.newFlightData != null)    // Catch case when BMS has exited and e.newFlightData is null
            {
                newBlinkingBitSet = ((e.newFlightData.blinkBits & (int)blinkbit) != 0);
            }
            else
            {
                newBlinkingBitSet = false;
            }
            if (e.oldFlightData != null)    // Catch case when BMS has exited and e.oldFlightData is null
            {
                oldBlinkingBitSet = ((e.oldFlightData.blinkBits & (int)blinkbit) != 0);
            }
            else
            {
                oldBlinkingBitSet = false;
            }
            if ((oldValue != newValue) || (newBlinkingBitSet != oldBlinkingBitSet))
            {
                timer.Stop();
                raiseFalconLightChanged(oldValue, newValue);
                if (newValue == true)           // LB went from Off to On
                {
                    lamplit = true;
                    if (newBlinkingBitSet)      // Blinking. Start Blink timer.
                    {
                        timer.Start();
                    }
                    else                        // Not Blinking. Stop Blink timer.
                    {
                        timer.Stop();
                    }
                }
                else                            // LB went from On to Off
                {
                    lamplit = false;
                    timer.Stop();
                }
            }
        }
Exemple #6
0
        protected override void OnFlightDataChanged(object sender, FlightDataChangedEventArgs e)
        {
            bool?oldValue = getValue(e.oldFlightData);
            bool?newValue = getValue(e.newFlightData);

            if (oldValue != null && newValue != null)
            {
                newAuxPwrOn = ((e.newFlightData.lightBits2 & (int)LightBits2.AuxPwr) != 0);
                oldAuxPwrOn = ((e.oldFlightData.lightBits2 & (int)LightBits2.AuxPwr) != 0);

                if (newAuxPwrOn)              // Only Flip-Flop OPEN Light if RWR is On.
                {
                    if (oldValue != newValue) // PRIORITY Light status changed. Update OPEN Light
                    {
                        if (newValue == true) // PRIORITY Light went On.  Turn OPEN Light OFF.
                        {
                            raiseFalconLightChanged(true, false);
                        }
                        else   // PRIORITY Light went OFF.  Turn OPEN Light ON.
                        {
                            raiseFalconLightChanged(false, true);
                        }
                    }
                }
                if (oldAuxPwrOn != newAuxPwrOn)           // AuxPwr Changed
                {
                    if (newAuxPwrOn && newValue == false) // AuxPwr came back on & PRIORITY Light is Off. Turn on OPEN Light.
                    {
                        raiseFalconLightChanged(false, true);
                    }
                    else    // AuxPwr came back on but PRIORITY Light is One. Turn off OPEN Light.
                    {
                        raiseFalconLightChanged(true, false);
                    }
                }
            }
        }
Exemple #7
0
        protected override void OnFlightDataChanged(object sender, FlightDataChangedEventArgs e)
        {
            bool?oldValue = getValue(e.oldFlightData);
            bool?newValue = getValue(e.newFlightData);

            //
            // Eric's Bus Pwr Enhancement
            //
            if (EmergBusPwr == true)
            {
                if (oldValue != newValue)
                {
                    raiseFalconLightChanged(oldValue, newValue);
                }
            }
            else
            {
            }

            //if (oldValue != newValue)
            //{
            //    raiseFalconLightChanged(oldValue, newValue);
            //}
        }
Exemple #8
0
 protected abstract void OnFlightDataChanged(object sender, FlightDataChangedEventArgs e);