diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 6810cf8daaf..2f59a4e9ece 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -109,6 +109,7 @@ 1. [ATC/TCAS] Fixed TCAS failure on baro corrected altitude going invalid - @tracernz (Mike) 1. [ATC/TCAS] Fixed TCAS slant range computation - @tracernz (Mike) 1. [A380X] Add baro unit (hPa/in.Hg) auto selection - @tracernz (Mike) +1. [A380X/PRIM] Adapt protection speeds to new flight model - @flogross89 (floridude) 1. [A380X/EFB] Improved Aircraft Presets configuration for the A380X - @frankkopp (cdr_maverick) 1. [A32NX/AMU] Enable VHF3 audio, and allow switching off VHF1 - @tracernz (Mike) 1. [A380X/PFD] Fix font colours on metric altitude display - @MrJigs7 (MrJigs.) diff --git a/fbw-a380x/src/systems/instruments/src/PFD/AttitudeIndicatorFixed.tsx b/fbw-a380x/src/systems/instruments/src/PFD/AttitudeIndicatorFixed.tsx index d7c775cf227..5db0fa26552 100644 --- a/fbw-a380x/src/systems/instruments/src/PFD/AttitudeIndicatorFixed.tsx +++ b/fbw-a380x/src/systems/instruments/src/PFD/AttitudeIndicatorFixed.tsx @@ -1,6 +1,6 @@ import { DisplayComponent, EventBus, FSComponent, Subject, Subscribable, VNode } from '@microsoft/msfs-sdk'; import { getDisplayIndex } from 'instruments/src/PFD/PFD'; -import { Arinc429Word } from '@flybywiresim/fbw-sdk'; +import { Arinc429ConsumerSubject, Arinc429Word } from '@flybywiresim/fbw-sdk'; import { FlightPathDirector } from './FlightPathDirector'; import { FlightPathVector } from './FlightPathVector'; import { Arinc429Values } from './shared/ArincValueProvider'; @@ -11,18 +11,22 @@ interface AttitudeIndicatorFixedUpperProps { } export class AttitudeIndicatorFixedUpper extends DisplayComponent { + private readonly sub = this.props.bus.getSubscriber(); + private roll = new Arinc429Word(0); private pitch = new Arinc429Word(0); private visibilitySub = Subject.create('hidden'); + private readonly fcdcDiscreteWord1 = Arinc429ConsumerSubject.create(this.sub.on('fcdcDiscreteWord1')); + + private readonly isNormalLawActive = this.fcdcDiscreteWord1.map((dw) => dw.bitValue(11) && !dw.isFailureWarning()); + onAfterRender(node: VNode): void { super.onAfterRender(node); - const sub = this.props.bus.getSubscriber(); - - sub.on('rollAr').handle((roll) => { + this.sub.on('rollAr').handle((roll) => { this.roll = roll; if (!this.roll.isNormalOperation()) { this.visibilitySub.set('hidden'); @@ -31,7 +35,7 @@ export class AttitudeIndicatorFixedUpper extends DisplayComponent { + this.sub.on('pitchAr').handle((pitch) => { this.pitch = pitch; if (!this.pitch.isNormalOperation()) { this.visibilitySub.set('hidden'); @@ -44,11 +48,19 @@ export class AttitudeIndicatorFixedUpper extends DisplayComponent - + (nl ? 'block' : 'none')) }} + > - - + (nl ? 'inherit' : 'none')) }} + > -