diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 4f8d58e3ba2..58d40bdbbcf 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -81,6 +81,7 @@ 1. [MISC] Fixed wrong msfs plane acceleration during reverser use causing autobrake wrong brake inputs - @Crocket63 (crocket) 1. [EFB] Fix default value for boarding rate - @tracernz (Mike) 1. [EFB] Added missing localization for SimBridge related settings in SimOptions page - @implasmatbh (Plasma) +1. [FWC] Implement non-cancellable master warning for overspeed and gear not down - @tracernz (Mike) ## 0.11.0 diff --git a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/model/A320_NEO_INTERIOR.xml b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/model/A320_NEO_INTERIOR.xml index b59db022baa..c913401601d 100644 --- a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/model/A320_NEO_INTERIOR.xml +++ b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/model/A320_NEO_INTERIOR.xml @@ -5016,7 +5016,6 @@ A32NX_PUSH_WARN_L A32NX_PUSH_WARN_L - 0 (>L:A32NX_MASTER_WARNING) 1 (>L:PUSH_AUTOPILOT_MASTERAWARN_L) @@ -5040,7 +5039,6 @@ A32NX_PUSH_CAUTION_L A32NX_PUSH_CAUTION_L - 0 (>L:A32NX_MASTER_CAUTION) 1 (>L:PUSH_AUTOPILOT_MASTERCAUT_L) @@ -5064,7 +5062,6 @@ A32NX_PUSH_WARN_R A32NX_PUSH_WARN_R - 0 (>L:A32NX_MASTER_WARNING) 1 (>L:PUSH_AUTOPILOT_MASTERAWARN_L) @@ -5088,7 +5085,6 @@ A32NX_PUSH_CAUTION_R A32NX_PUSH_CAUTION_R - 0 (>L:A32NX_MASTER_CAUTION) 1 (>L:PUSH_AUTOPILOT_MASTERCAUT_L) diff --git a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/A32NX_Core/A32NX_FWC.js b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/A32NX_Core/A32NX_FWC.js index d501987b561..701f00e2294 100644 --- a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/A32NX_Core/A32NX_FWC.js +++ b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/A32NX_Core/A32NX_FWC.js @@ -53,10 +53,6 @@ class A32NX_FWC { // ESDL 1. 0.320 this.memoLdgInhibit_conf01 = new NXLogic_ConfirmNode(3, true); // CONF 01 - // master warning & caution buttons - this.warningPressed = false; - this.cautionPressed = false; - // altitude warning this.previousTargetAltitude = NaN; this._wasBellowThreshold = false; @@ -75,17 +71,6 @@ class A32NX_FWC { _updateButtons(_deltaTime) { this.toConfigTest = SimVar.GetSimVarValue('L:A32NX_FWS_TO_CONFIG_TEST', 'boolean'); - - if (SimVar.GetSimVarValue("L:PUSH_AUTOPILOT_MASTERAWARN_L", "Bool") || SimVar.GetSimVarValue("L:PUSH_AUTOPILOT_MASTERAWARN_R", "Bool")) { - this.warningPressed = true; - } else { - this.warningPressed = false; - } - if (SimVar.GetSimVarValue("L:PUSH_AUTOPILOT_MASTERCAUT_L", "Bool") || SimVar.GetSimVarValue("L:PUSH_AUTOPILOT_MASTERCAUT_R", "Bool")) { - this.cautionPressed = true; - } else { - this.cautionPressed = false; - } } _updateFlightPhase(_deltaTime) { @@ -302,7 +287,8 @@ class A32NX_FWC { SimVar.SetSimVarValue("L:A32NX_ALT_DEVIATION_SHORT", "Bool", false); } - if (this.warningPressed === true) { + const warningPressed = SimVar.GetSimVarValue("L:PUSH_AUTOPILOT_MASTERAWARN_L", "Bool") || SimVar.GetSimVarValue("L:PUSH_AUTOPILOT_MASTERAWARN_R", "Bool"); + if (warningPressed) { this._wasBellowThreshold = false; this._wasAboveThreshold = false; this._wasInRange = false; diff --git a/fbw-a32nx/src/systems/instruments/src/EWD/PseudoFWC.ts b/fbw-a32nx/src/systems/instruments/src/EWD/PseudoFWC.ts index 45a44747148..f5b64ab9c08 100644 --- a/fbw-a32nx/src/systems/instruments/src/EWD/PseudoFWC.ts +++ b/fbw-a32nx/src/systems/instruments/src/EWD/PseudoFWC.ts @@ -2,7 +2,7 @@ // // SPDX-License-Identifier: GPL-3.0 -import { Subject, Subscribable, MappedSubject, DebounceTimer, ConsumerValue, EventBus, ConsumerSubject, SimVarValueType } from '@microsoft/msfs-sdk'; +import { Subject, Subscribable, MappedSubject, DebounceTimer, ConsumerValue, EventBus, ConsumerSubject, SimVarValueType, SubscribableMapFunctions } from '@microsoft/msfs-sdk'; import { Arinc429Register, Arinc429Word, NXDataStore, NXLogicClockNode, NXLogicConfirmNode, NXLogicMemoryNode, NXLogicPulseNode, NXLogicTriggeredMonostableNode } from '@flybywiresim/fbw-sdk'; import { VerticalMode } from '@shared/autopilot'; @@ -25,7 +25,7 @@ interface EWDItem { failure: number, sysPage: number, side: string, - /** Cancel flag (only emergency cancel can cancel if false), defaults to true. */ + /** Cancel flag for level 3 warning audio (only emergency cancel can cancel if false), defaults to true. */ cancel?: boolean, } @@ -86,8 +86,10 @@ export class PseudoFWC { private readonly fireActive = Subject.create(false); + private nonCancellableWarningCount = 0; + private readonly masterWarningOutput = MappedSubject.create( - ([masterWarning, fireActive]) => masterWarning || fireActive, + SubscribableMapFunctions.or(), this.masterWarning, this.fireActive, ); @@ -1573,7 +1575,7 @@ export class PseudoFWC { this.masterCaution.set(false); this.auralSingleChimePending = false; } - if (masterWarningButtonLeft || masterWarningButtonRight) { + if ((masterWarningButtonLeft || masterWarningButtonRight) && this.nonCancellableWarningCount === 0) { this.masterWarning.set(false); this.auralCrcActive.set(false); } @@ -1603,15 +1605,8 @@ export class PseudoFWC { /* CLEAR AND RECALL */ if (this.clrTriggerRisingEdge) { - // delete the first cancellable failure - for (const [index, failure] of this.failuresLeft.entries()) { - const cancellable = this.ewdMessageFailures[failure]?.cancel; - if (cancellable === false) { - continue; - } - this.failuresLeft.splice(index, 1); - break; - } + // delete the first failure + this.failuresLeft.splice(0, 1); this.recallFailures = this.allCurrentFailures.filter((item) => !this.failuresLeft.includes(item)); } @@ -1665,6 +1660,7 @@ export class PseudoFWC { this.recallFailures.length = 0; this.recallFailures.push(...recallFailureKeys); + this.nonCancellableWarningCount = 0; // Failures first for (const [key, value] of Object.entries(this.ewdMessageFailures)) { @@ -1691,6 +1687,10 @@ export class PseudoFWC { } } + if (value.cancel === false && value.failure === 3) { + this.nonCancellableWarningCount++; + } + // if the warning is the same as the aural if (value.auralWarning === undefined && value.failure === 3) { if (newWarning) { @@ -1833,7 +1833,9 @@ export class PseudoFWC { if (orderedFailureArrayRight.length === 0) { this.masterCaution.set(false); - this.masterWarning.set(false); + if (this.nonCancellableWarningCount === 0) { + this.masterWarning.set(false); + } } } @@ -1921,6 +1923,7 @@ export class PseudoFWC { failure: 3, sysPage: -1, side: 'LEFT', + cancel: false, }, 3400220: { // OVERSPEED FLAPS 3 flightPhaseInhib: [2, 3, 4, 8, 9, 10], @@ -1932,6 +1935,7 @@ export class PseudoFWC { failure: 3, sysPage: -1, side: 'LEFT', + cancel: false, }, 3400230: { // OVERSPEED FLAPS 2 flightPhaseInhib: [2, 3, 4, 8, 9, 10], @@ -1944,6 +1948,7 @@ export class PseudoFWC { failure: 3, sysPage: -1, side: 'LEFT', + cancel: false, }, 3400235: { // OVERSPEED FLAPS 1+F flightPhaseInhib: [2, 3, 4, 8, 9, 10], @@ -1956,6 +1961,7 @@ export class PseudoFWC { failure: 3, sysPage: -1, side: 'LEFT', + cancel: false, }, 3400240: { // OVERSPEED FLAPS 1 flightPhaseInhib: [2, 3, 4, 8, 9, 10], @@ -1968,6 +1974,7 @@ export class PseudoFWC { failure: 3, sysPage: -1, side: 'LEFT', + cancel: false, }, 7700027: { // DUAL ENGINE FAILURE flightPhaseInhib: [],