Skip to content

Commit

Permalink
fix(a380x-fire): hide items of abnormal fire test when on ground (fly…
Browse files Browse the repository at this point in the history
…bywiresim#9088)

* fix: hide items of abnormal fire test when on ground

* fix: style of fire messages
  • Loading branch information
mjuhe authored Oct 19, 2024
1 parent e6aaaf8 commit 3478c4d
Show file tree
Hide file tree
Showing 3 changed files with 116 additions and 95 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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,
},
{
Expand Down Expand Up @@ -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,
},
{
Expand Down Expand Up @@ -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,
},
{
Expand Down Expand Up @@ -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,
},
{
Expand All @@ -257,7 +261,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = {
},
{
name: 'WHEN ACFT STOPPED :',
sensed: false,
sensed: true,
style: ChecklistLineStyle.Headline,
level: 1,
},
{
Expand Down Expand Up @@ -310,7 +315,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = {
},
{
name: 'IF EVAC RQRD :',
sensed: false,
sensed: true,
style: ChecklistLineStyle.Headline,
level: 2,
},
{
Expand All @@ -333,7 +339,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = {
},
{
name: 'IF EVAC NOT RQRD :',
sensed: false,
sensed: true,
style: ChecklistLineStyle.Headline,
level: 2,
},
{
Expand All @@ -355,7 +362,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = {
},
{
name: 'WHEN ACFT STOPPED :',
sensed: false,
sensed: true,
style: ChecklistLineStyle.Headline,
level: 1,
},
{
Expand Down Expand Up @@ -408,7 +416,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = {
},
{
name: 'IF EVAC RQRD :',
sensed: false,
sensed: true,
style: ChecklistLineStyle.Headline,
level: 2,
},
{
Expand All @@ -431,7 +440,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = {
},
{
name: 'IF EVAC NOT RQRD :',
sensed: false,
sensed: true,
style: ChecklistLineStyle.Headline,
level: 2,
},
{
Expand All @@ -453,7 +463,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = {
},
{
name: 'WHEN ACFT STOPPED :',
sensed: false,
sensed: true,
style: ChecklistLineStyle.Headline,
level: 1,
},
{
Expand Down Expand Up @@ -506,7 +517,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = {
},
{
name: 'IF EVAC RQRD :',
sensed: false,
sensed: true,
style: ChecklistLineStyle.Headline,
level: 2,
},
{
Expand All @@ -529,7 +541,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = {
},
{
name: 'IF EVAC NOT RQRD :',
sensed: false,
sensed: true,
style: ChecklistLineStyle.Headline,
level: 2,
},
{
Expand All @@ -551,7 +564,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = {
},
{
name: 'WHEN ACFT STOPPED :',
sensed: false,
sensed: true,
style: ChecklistLineStyle.Headline,
level: 1,
},
{
Expand Down Expand Up @@ -604,7 +618,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = {
},
{
name: 'IF EVAC RQRD :',
sensed: false,
sensed: true,
style: ChecklistLineStyle.Headline,
level: 2,
},
{
Expand All @@ -627,7 +642,8 @@ export const EcamAbnormalSensedAta26: { [n: number]: AbnormalProcedure } = {
},
{
name: 'IF EVAC NOT RQRD :',
sensed: false,
sensed: true,
style: ChecklistLineStyle.Headline,
level: 2,
},
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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(),
Expand Down Expand Up @@ -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,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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');
Expand Down

0 comments on commit 3478c4d

Please sign in to comment.