From 3478c4dd82ec8c4e9c0a34eec517b3dfcb7e8b3d Mon Sep 17 00:00:00 2001 From: Miquel Juhe <60938089+mjuhe@users.noreply.github.com> Date: Sat, 19 Oct 2024 12:14:40 +0100 Subject: [PATCH] fix(a380x-fire): hide items of abnormal fire test when on ground (#9088) * fix: hide items of abnormal fire test when on ground * fix: style of fire messages --- .../EcamMessages/AbnormalSensed/ata26.tsx | 40 +++-- .../FlightWarningSystem/FwsAbnormalSensed.ts | 167 +++++++++--------- .../systems/FlightWarningSystem/FwsCore.ts | 4 + 3 files changed, 116 insertions(+), 95 deletions(-) diff --git a/fbw-a380x/src/systems/instruments/src/MsfsAvionicsCommon/EcamMessages/AbnormalSensed/ata26.tsx b/fbw-a380x/src/systems/instruments/src/MsfsAvionicsCommon/EcamMessages/AbnormalSensed/ata26.tsx index b53db59f992..91d0a97e51b 100644 --- a/fbw-a380x/src/systems/instruments/src/MsfsAvionicsCommon/EcamMessages/AbnormalSensed/ata26.tsx +++ b/fbw-a380x/src/systems/instruments/src/MsfsAvionicsCommon/EcamMessages/AbnormalSensed/ata26.tsx @@ -100,6 +100,7 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = { // When timer elapsed, this should change to 'AS STILL FIRE AFTER 30 S' name: 'IF STILL FIRE AFTER 30 S :', sensed: false, + style: ChecklistLineStyle.Headline, level: 1, }, { @@ -145,6 +146,7 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = { // When timer elapsed, this should change to 'AS STILL FIRE AFTER 30 S' name: 'IF STILL FIRE AFTER 30 S :', sensed: false, + style: ChecklistLineStyle.Headline, level: 1, }, { @@ -190,6 +192,7 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = { // When timer elapsed, this should change to 'AS STILL FIRE AFTER 30 S' name: 'IF STILL FIRE AFTER 30 S :', sensed: false, + style: ChecklistLineStyle.Headline, level: 1, }, { @@ -235,6 +238,7 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = { // When timer elapsed, this should change to 'AS STILL FIRE AFTER 30 S' name: 'IF STILL FIRE AFTER 30 S :', sensed: false, + style: ChecklistLineStyle.Headline, level: 1, }, { @@ -257,7 +261,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = { }, { name: 'WHEN ACFT STOPPED :', - sensed: false, + sensed: true, + style: ChecklistLineStyle.Headline, level: 1, }, { @@ -310,7 +315,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = { }, { name: 'IF EVAC RQRD :', - sensed: false, + sensed: true, + style: ChecklistLineStyle.Headline, level: 2, }, { @@ -333,7 +339,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = { }, { name: 'IF EVAC NOT RQRD :', - sensed: false, + sensed: true, + style: ChecklistLineStyle.Headline, level: 2, }, { @@ -355,7 +362,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = { }, { name: 'WHEN ACFT STOPPED :', - sensed: false, + sensed: true, + style: ChecklistLineStyle.Headline, level: 1, }, { @@ -408,7 +416,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = { }, { name: 'IF EVAC RQRD :', - sensed: false, + sensed: true, + style: ChecklistLineStyle.Headline, level: 2, }, { @@ -431,7 +440,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = { }, { name: 'IF EVAC NOT RQRD :', - sensed: false, + sensed: true, + style: ChecklistLineStyle.Headline, level: 2, }, { @@ -453,7 +463,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = { }, { name: 'WHEN ACFT STOPPED :', - sensed: false, + sensed: true, + style: ChecklistLineStyle.Headline, level: 1, }, { @@ -506,7 +517,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = { }, { name: 'IF EVAC RQRD :', - sensed: false, + sensed: true, + style: ChecklistLineStyle.Headline, level: 2, }, { @@ -529,7 +541,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = { }, { name: 'IF EVAC NOT RQRD :', - sensed: false, + sensed: true, + style: ChecklistLineStyle.Headline, level: 2, }, { @@ -551,7 +564,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = { }, { name: 'WHEN ACFT STOPPED :', - sensed: false, + sensed: true, + style: ChecklistLineStyle.Headline, level: 1, }, { @@ -604,7 +618,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = { }, { name: 'IF EVAC RQRD :', - sensed: false, + sensed: true, + style: ChecklistLineStyle.Headline, level: 2, }, { @@ -627,7 +642,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = { }, { name: 'IF EVAC NOT RQRD :', - sensed: false, + sensed: true, + style: ChecklistLineStyle.Headline, level: 2, }, { 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 eefc23cabbf..48eff70bb29 100644 --- a/fbw-a380x/src/systems/systems-host/systems/FlightWarningSystem/FwsAbnormalSensed.ts +++ b/fbw-a380x/src/systems/systems-host/systems/FlightWarningSystem/FwsAbnormalSensed.ts @@ -491,7 +491,7 @@ export class FwsAbnormalSensed { flightPhaseInhib: [5, 6], simVarIsActive: this.fws.apuFireDetected, notActiveWhenFaults: [], - whichItemsToShow: () => [true, true, true], + whichItemsToShow: () => [!this.fws.fireTestPb.get(), !this.fws.fireTestPb.get(), !this.fws.fireTestPb.get()], whichItemsChecked: () => [ this.fws.fireButtonAPU.get(), this.fws.apuAgentDischarged.get(), @@ -642,22 +642,22 @@ export class FwsAbnormalSensed { ), notActiveWhenFaults: [], whichItemsToShow: () => [ - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), ], whichItemsChecked: () => [ this.fws.allThrottleIdle.get(), @@ -691,22 +691,22 @@ export class FwsAbnormalSensed { ), notActiveWhenFaults: [], whichItemsToShow: () => [ - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), ], whichItemsChecked: () => [ this.fws.allThrottleIdle.get(), @@ -740,22 +740,22 @@ export class FwsAbnormalSensed { ), notActiveWhenFaults: [], whichItemsToShow: () => [ - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), ], whichItemsChecked: () => [ this.fws.allThrottleIdle.get(), @@ -789,22 +789,22 @@ export class FwsAbnormalSensed { ), notActiveWhenFaults: [], whichItemsToShow: () => [ - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, - true, + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), + !this.fws.fireTestPb.get(), ], whichItemsChecked: () => [ this.fws.allThrottleIdle.get(), @@ -982,24 +982,25 @@ export class FwsAbnormalSensed { simVarIsActive: this.fws.mlgFireDetected, notActiveWhenFaults: [], whichItemsToShow: () => [ - this.fws.computedAirSpeedToNearest2.get() > 250 || this.fws.machSelectedFromAdr.get() > 0.55, - true, - true, - true, - true, - this.fws.aircraftOnGround.get(), - this.fws.aircraftOnGround.get(), - this.fws.aircraftOnGround.get(), - this.fws.aircraftOnGround.get(), - this.fws.aircraftOnGround.get(), - this.fws.aircraftOnGround.get(), - this.fws.aircraftOnGround.get(), - this.fws.aircraftOnGround.get(), - this.fws.aircraftOnGround.get(), - this.fws.aircraftOnGround.get(), - this.fws.aircraftOnGround.get(), - this.fws.aircraftOnGround.get(), - this.fws.aircraftOnGround.get(), + !this.fws.fireTestPb.get() && + (this.fws.computedAirSpeedToNearest2.get() > 250 || this.fws.machSelectedFromAdr.get() > 0.55), + !this.fws.fireTestPb.get() && true, + !this.fws.fireTestPb.get() && true, + !this.fws.fireTestPb.get() && true, + !this.fws.fireTestPb.get() && true, + !this.fws.fireTestPb.get() && this.fws.aircraftOnGround.get(), + !this.fws.fireTestPb.get() && this.fws.aircraftOnGround.get(), + !this.fws.fireTestPb.get() && this.fws.aircraftOnGround.get(), + !this.fws.fireTestPb.get() && this.fws.aircraftOnGround.get(), + !this.fws.fireTestPb.get() && this.fws.aircraftOnGround.get(), + !this.fws.fireTestPb.get() && this.fws.aircraftOnGround.get(), + !this.fws.fireTestPb.get() && this.fws.aircraftOnGround.get(), + !this.fws.fireTestPb.get() && this.fws.aircraftOnGround.get(), + !this.fws.fireTestPb.get() && this.fws.aircraftOnGround.get(), + !this.fws.fireTestPb.get() && this.fws.aircraftOnGround.get(), + !this.fws.fireTestPb.get() && this.fws.aircraftOnGround.get(), + !this.fws.fireTestPb.get() && this.fws.aircraftOnGround.get(), + !this.fws.fireTestPb.get() && this.fws.aircraftOnGround.get(), ], whichItemsChecked: () => [ false, 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 dc64ed5a7df..e494662e2ee 100644 --- a/fbw-a380x/src/systems/systems-host/systems/FlightWarningSystem/FwsCore.ts +++ b/fbw-a380x/src/systems/systems-host/systems/FlightWarningSystem/FwsCore.ts @@ -634,6 +634,8 @@ export class FwsCore { public readonly allFireButtons = Subject.create(false); + public readonly fireTestPb = Subject.create(false); + /* 27 - FLIGHT CONTROLS */ public readonly altn1LawConfirmNode = new NXLogicConfirmNode(0.3, true); @@ -3482,6 +3484,8 @@ export class FwsCore { this.cargoFireTest.set(SimVar.GetSimVarValue('L:A32NX_FIRE_TEST_CARGO', 'bool')); this.cargoFireAgentDisch.set(SimVar.GetSimVarValue('L:A32NX_CARGOSMOKE_FWD_DISCHARGED', 'bool')); + this.fireTestPb.set(SimVar.GetSimVarValue('L:A32NX_OVHD_FIRE_TEST_PB_IS_PRESSED', 'bool')); + /* ANTI ICE */ const icePercentage = SimVar.GetSimVarValue('STRUCTURAL ICE PCT', 'percent over 100');