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 { } }
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) { float?oldValue = getValue(e.oldFlightData); float?newValue = getValue(e.newFlightData); if (oldValue != newValue) { raiseFalconLightChanged(newValue); } }
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(); } } }
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); } } } }
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); //} }
protected abstract void OnFlightDataChanged(object sender, FlightDataChangedEventArgs e);