diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index cc0fe269dae..995180f2a33 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -121,6 +121,7 @@ 1. [ATSU] Fixed issues with the ALL-CALLSIGNS recipient on Hoppie - @CronixZero (CronixZero) 1. [A380X/MFD] Add ATCCOM D-ATIS page layout - @heclak (Heclak) 1. [A380X/FMS] Enable FMC reset through overhead reset panel push buttons - @flogross89 (floridude) +1. [A380X/FCU] Add TRUE indication on FCU when TRUE North reference is selected on AFS CP - @heclak (Heclak) ## 0.12.0 diff --git a/fbw-a380x/src/systems/instruments/src/FCU/Components/FcuDisplay.tsx b/fbw-a380x/src/systems/instruments/src/FCU/Components/FcuDisplay.tsx index 0cedd3f7c53..049b700da4c 100644 --- a/fbw-a380x/src/systems/instruments/src/FCU/Components/FcuDisplay.tsx +++ b/fbw-a380x/src/systems/instruments/src/FCU/Components/FcuDisplay.tsx @@ -22,7 +22,7 @@ export class FcuDisplay extends DisplayComponent {
(v ? 'off' : 'on'))}>
- +
diff --git a/fbw-a380x/src/systems/instruments/src/FCU/Components/Heading.tsx b/fbw-a380x/src/systems/instruments/src/FCU/Components/Heading.tsx index 955d1172902..6c8b6255045 100644 --- a/fbw-a380x/src/systems/instruments/src/FCU/Components/Heading.tsx +++ b/fbw-a380x/src/systems/instruments/src/FCU/Components/Heading.tsx @@ -1,16 +1,52 @@ // Copyright (c) 2023-2024 FlyByWire Simulations // SPDX-License-Identifier: GPL-3.0 -import { DisplayComponent, FSComponent, VNode } from '@microsoft/msfs-sdk'; +import { + ConsumerSubject, + DisplayComponent, + EventBus, + FSComponent, + MappedSubject, + SubscribableMapFunctions, + VNode, +} from '@microsoft/msfs-sdk'; +import { FcuEvents } from 'instruments/src/FCU/Publishers/FcuPublisher'; +import { OverheadEvents } from 'instruments/src/MsfsAvionicsCommon/providers/OverheadPublisher'; -export interface HeadingProps {} +export interface HeadingProps { + readonly bus: EventBus; +} export class Heading extends DisplayComponent { + private readonly sub = this.props.bus.getSubscriber(); + + private readonly isLightTestActive = ConsumerSubject.create(this.sub.on('ovhd_ann_lt_test_active'), false); + private readonly trueRefActive = ConsumerSubject.create(this.sub.on('fcu_push_true_ref'), false); + + private readonly trueIndicatorActive = MappedSubject.create( + SubscribableMapFunctions.or(), + this.isLightTestActive, + this.trueRefActive, + ); + + onAfterRender(node: VNode): void { + super.onAfterRender(node); + } + render(): VNode | null { return (
- + TRUE diff --git a/fbw-a380x/src/systems/instruments/src/FCU/Managers/HeadingManager.ts b/fbw-a380x/src/systems/instruments/src/FCU/Managers/HeadingManager.ts index f08d9ace0fa..54a4b55d550 100644 --- a/fbw-a380x/src/systems/instruments/src/FCU/Managers/HeadingManager.ts +++ b/fbw-a380x/src/systems/instruments/src/FCU/Managers/HeadingManager.ts @@ -222,12 +222,10 @@ export class HeadingManager extends TemporaryHax implements Instrument { this.isTRKMode = _isTRKMode; this.showSelectedHeading = _showSelectedHeading; this.currentValue = _value; - this.setTextElementActive(this.textTRUE, false); this.setTextElementActive(this.textHDG, !this.isTRKMode); this.setTextElementActive(this.textTRK, !!this.isTRKMode); this.lightsTest = _lightsTest; if (this.lightsTest) { - this.setTextElementActive(this.textTRUE, true); this.setTextElementActive(this.textHDG, true); this.setTextElementActive(this.textTRK, true); this.setElementVisibility(this.signDegrees, true); diff --git a/fbw-a380x/src/systems/instruments/src/FCU/Publishers/FcuPublisher.ts b/fbw-a380x/src/systems/instruments/src/FCU/Publishers/FcuPublisher.ts index 93627397250..20b14e4de22 100644 --- a/fbw-a380x/src/systems/instruments/src/FCU/Publishers/FcuPublisher.ts +++ b/fbw-a380x/src/systems/instruments/src/FCU/Publishers/FcuPublisher.ts @@ -9,6 +9,7 @@ interface FcuBaseEvents { fcu_trk_fpa_active: boolean; fcu_left_navaid_mode: NavAidMode; fcu_right_navaid_mode: NavAidMode; + fcu_push_true_ref: boolean; fcu_loc_mode_active: boolean; fcu_approach_mode_active: boolean; } @@ -38,6 +39,7 @@ export class FcuPublisher extends SimVarPublisher { 'fcu_right_navaid_mode', { name: `L:A32NX_EFIS_R_NAVAID_#index#_MODE`, type: SimVarValueType.Enum, indexed: true }, ], + ['fcu_push_true_ref', { name: `L:A32NX_PUSH_TRUE_REF`, type: SimVarValueType.Bool }], [ 'fcu_loc_mode_active', {