From 0e0401dae1f8c19af7d0d0f6c9843458cc7a5934 Mon Sep 17 00:00:00 2001 From: flogross89 <63071941+flogross89@users.noreply.github.com> Date: Fri, 3 Jan 2025 02:06:04 +0100 Subject: [PATCH] BM's review comments --- .../FlightWarningSystem/FwsAbnormalSensed.ts | 12 ++++++---- .../systems/FlightWarningSystem/FwsCore.ts | 22 +++++++++++-------- 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/fbw-a380x/src/systems/systems-host/systems/FlightWarningSystem/FwsAbnormalSensed.ts b/fbw-a380x/src/systems/systems-host/systems/FlightWarningSystem/FwsAbnormalSensed.ts index 43cce185df8..f316ed9cce5 100644 --- a/fbw-a380x/src/systems/systems-host/systems/FlightWarningSystem/FwsAbnormalSensed.ts +++ b/fbw-a380x/src/systems/systems-host/systems/FlightWarningSystem/FwsAbnormalSensed.ts @@ -2900,10 +2900,14 @@ export class FwsAbnormalSensed { 314800008: { // FWS 1 FAULT flightPhaseInhib: [3, 4, 5, 6, 7, 9, 10], - simVarIsActive: this.fws.fws1Failed, + simVarIsActive: MappedSubject.create( + SubscribableMapFunctions.and(), + this.fws.fws1Failed, + this.fws.dcESSBusPowered, + ), whichItemsToShow: () => [], whichItemsChecked: () => [], - notActiveWhenFaults: ['314800004'], + notActiveWhenFaults: ['314800002', '314800003', '314800004'], failure: 1, sysPage: -1, info: () => ['220200005'], @@ -2912,10 +2916,10 @@ export class FwsAbnormalSensed { 314800009: { // FWS 2 FAULT flightPhaseInhib: [3, 4, 5, 6, 7, 9, 10], - simVarIsActive: this.fws.fws2Failed, + simVarIsActive: MappedSubject.create(SubscribableMapFunctions.and(), this.fws.fws2Failed, this.fws.dc2BusPowered), whichItemsToShow: () => [], whichItemsChecked: () => [], - notActiveWhenFaults: ['314800004'], + notActiveWhenFaults: ['314800002', '314800003', '314800004'], failure: 1, sysPage: -1, info: () => ['220200005'], diff --git a/fbw-a380x/src/systems/systems-host/systems/FlightWarningSystem/FwsCore.ts b/fbw-a380x/src/systems/systems-host/systems/FlightWarningSystem/FwsCore.ts index 2097cc1d7bc..8500edf0482 100644 --- a/fbw-a380x/src/systems/systems-host/systems/FlightWarningSystem/FwsCore.ts +++ b/fbw-a380x/src/systems/systems-host/systems/FlightWarningSystem/FwsCore.ts @@ -1482,6 +1482,10 @@ export class FwsCore { public readonly eng3Or4TakeoffPower = Subject.create(false); + /** 42 AVIONICS NETWORK */ + public readonly cpiomC1Available = Subject.create(false); + public readonly cpiomC2Available = Subject.create(false); + /* ICE */ public readonly iceDetectedTimer1 = new NXLogicConfirmNode(40, false); @@ -1536,12 +1540,6 @@ export class FwsCore { } }); - this.shutDownFor50MinutesCheckListReset.sub((v) => { - if (v) { - this.turnaroundReset(); - } - }); - this.ewdMessageLinesLeft.forEach((ls, i) => ls.sub((l) => { SimVar.SetSimVarValue(FwsCore.ewdMessageSimVarsLeft[i], 'string', l ?? ''); @@ -1905,9 +1903,7 @@ export class FwsCore { !SimVar.GetSimVarValue('L:A32NX_AFDX_13_13_REACHABLE', SimVarValueType.Bool) && !SimVar.GetSimVarValue('L:A32NX_AFDX_4_4_REACHABLE', SimVarValueType.Bool) && !SimVar.GetSimVarValue('L:A32NX_AFDX_14_14_REACHABLE', SimVarValueType.Bool); - this.fwsEcpFailed.set( - this.failuresConsumer.isActive(A380Failure.FwsEcp) || !this.dcESSBusPowered.get() || ecpNotReachable, - ); + this.fwsEcpFailed.set(this.failuresConsumer.isActive(A380Failure.FwsEcp) || ecpNotReachable); // Update flight phases this.flightPhases.update(deltaTime); @@ -1958,6 +1954,10 @@ export class FwsCore { ), ); + if (this.phase12ShutdownMemoryNode.read()) { + this.turnaroundReset(); + } + // TO CONFIG button this.toConfigTestRaw = SimVar.GetSimVarValue('L:A32NX_BTN_TOCONFIG', 'bool') > 0; this.toConfigPulseNode.write(this.toConfigTestRaw, _deltaTime); @@ -3765,6 +3765,10 @@ export class FwsCore { this.fireTestPb.set(SimVar.GetSimVarValue('L:A32NX_OVHD_FIRE_TEST_PB_IS_PRESSED', 'bool')); + /* 42 AVIONICS NETWORK */ + this.cpiomC1Available.set(SimVar.GetSimVarValue('L:A32NX_CPIOM_C1_AVAIL', 'bool')); + this.cpiomC2Available.set(SimVar.GetSimVarValue('L:A32NX_CPIOM_C1_AVAIL', 'bool')); + /* ANTI ICE */ const icePercentage = SimVar.GetSimVarValue('STRUCTURAL ICE PCT', 'percent over 100');