diff --git a/fbw-a380x/src/systems/instruments/src/PFD/LandingSystemIndicator.tsx b/fbw-a380x/src/systems/instruments/src/PFD/LandingSystemIndicator.tsx
index ffb26b26731..2e0ca821c8a 100644
--- a/fbw-a380x/src/systems/instruments/src/PFD/LandingSystemIndicator.tsx
+++ b/fbw-a380x/src/systems/instruments/src/PFD/LandingSystemIndicator.tsx
@@ -13,6 +13,7 @@ import { Arinc429Word } from '@flybywiresim/fbw-sdk';
import { Arinc429Values } from './shared/ArincValueProvider';
import { PFDSimvars } from './shared/PFDSimvarPublisher';
import { LagFilter } from './PFDUtils';
+import { FmgcFlightPhase } from '@shared/flightphase';
export class LandingSystem extends DisplayComponent<{ bus: EventBus; instrument: BaseInstrument }> {
private lsButtonPressedVisibility = false;
@@ -95,11 +96,14 @@ export class LandingSystem extends DisplayComponent<{ bus: EventBus; instrument:
-
+
-
+
+
+
+
@@ -609,14 +613,14 @@ class MarkerBeaconIndicator extends DisplayComponent<{ bus: EventBus }> {
}
}
-class LsReminder extends DisplayComponent<{ bus: EventBus }> {
- private readonly lsReminderRef = FSComponent.createRef();
+class LsTitle extends DisplayComponent<{ bus: EventBus }> {
+ private readonly lsTitle = FSComponent.createRef();
private readonly hasLoc = ConsumerSubject.create(null, false);
private readonly lsButton = ConsumerSubject.create(null, false);
- private readonly ilsReminderShown = MappedSubject.create(
+ private readonly ilsTitleShown = MappedSubject.create(
([hasLoc, lsButton]) => hasLoc && lsButton,
this.hasLoc,
this.lsButton,
@@ -631,20 +635,73 @@ class LsReminder extends DisplayComponent<{ bus: EventBus }> {
this.lsButton.setConsumer(sub.on(getDisplayIndex() === 2 ? 'ls2Button' : 'ls1Button').whenChanged());
// normally the ident and freq should be always displayed when an ILS freq is set, but currently it only show when we have a signal
- this.ilsReminderShown.sub((it) => {
+ this.ilsTitleShown.sub((it) => {
if (it) {
- this.lsReminderRef.instance.style.display = 'inline';
+ this.lsTitle.instance.style.display = 'inline';
} else {
- this.lsReminderRef.instance.style.display = 'none';
+ this.lsTitle.instance.style.display = 'none';
}
});
}
render(): VNode {
return (
-
+
ILS
);
}
}
+
+class LsReminderIndicator extends DisplayComponent<{ bus: EventBus }> {
+ private readonly sub = this.props.bus.getSubscriber();
+
+ private readonly lsReminder = FSComponent.createRef();
+
+ private readonly glsMlsFlsOrLocVnavInstalled = Subject.create(true);
+
+ private readonly fwcFlightPhase = ConsumerSubject.create(this.sub.on('fwcFlightPhase'), 0);
+
+ private readonly fmgcFlightPhase = ConsumerSubject.create(this.sub.on('fmgcFlightPhase'), FmgcFlightPhase.Preflight);
+
+ private readonly approachModePushed = ConsumerSubject.create(this.sub.on('fcuApproachModeActive'), false);
+
+ private readonly lsButton = ConsumerSubject.create(null, false);
+
+ private readonly lsReminderVisible = MappedSubject.create(
+ ([fwcPhase, fmgcPhase, approachModePushed, lsPushed]) => {
+ return (
+ approachModePushed &&
+ fmgcPhase === FmgcFlightPhase.Approach &&
+ !lsPushed && // TODO Check if LOC or G/S scales are invalid
+ fwcPhase !== 10 &&
+ fwcPhase !== 11 &&
+ fwcPhase !== 12
+ );
+ },
+ this.fwcFlightPhase,
+ this.fmgcFlightPhase,
+ this.approachModePushed,
+ this.lsButton,
+ );
+
+ onAfterRender(node: VNode): void {
+ super.onAfterRender(node);
+ this.lsButton.setConsumer(this.sub.on(getDisplayIndex() === 2 ? 'ls2Button' : 'ls1Button'));
+ this.lsReminderVisible.sub((v) => {
+ if (v) {
+ this.lsReminder.instance.style.display = 'inline';
+ } else {
+ this.lsReminder.instance.style.display = 'none';
+ }
+ });
+ }
+
+ render(): VNode {
+ return (
+
+ {this.glsMlsFlsOrLocVnavInstalled.map((v) => (v ? 'LS' : 'ILS'))}
+
+ );
+ }
+}
diff --git a/fbw-a380x/src/systems/instruments/src/PFD/shared/PFDSimvarPublisher.tsx b/fbw-a380x/src/systems/instruments/src/PFD/shared/PFDSimvarPublisher.tsx
index b289f68de72..b2dc5ed0d7b 100644
--- a/fbw-a380x/src/systems/instruments/src/PFD/shared/PFDSimvarPublisher.tsx
+++ b/fbw-a380x/src/systems/instruments/src/PFD/shared/PFDSimvarPublisher.tsx
@@ -167,6 +167,7 @@ export interface PFDSimvars {
spoilersArmed: boolean;
fcuLeftVelocityVectorOn: boolean;
fcuRightVelocityVectorOn: boolean;
+ fcuApproachModeActive: boolean;
}
export enum PFDVars {
@@ -334,6 +335,7 @@ export enum PFDVars {
spoilersArmed = 'L:A32NX_SPOILERS_ARMED',
fcuLeftVelocityVectorOn = 'L:A380X_EFIS_L_VV_BUTTON_IS_ON',
fcuRightVelocityVectorOn = 'L:A380X_EFIS_R_VV_BUTTON_IS_ON',
+ fcuApproachModeActive = 'L:A32NX_FCU_APPR_MODE_ACTIVE',
}
/** A publisher to poll and publish nav/com simvars. */
@@ -500,6 +502,7 @@ export class PFDSimvarPublisher extends UpdatableSimVarPublisher {
['spoilersArmed', { name: PFDVars.spoilersArmed, type: SimVarValueType.Bool }],
['fcuLeftVelocityVectorOn', { name: PFDVars.fcuLeftVelocityVectorOn, type: SimVarValueType.Bool }],
['fcuRightVelocityVectorOn', { name: PFDVars.fcuRightVelocityVectorOn, type: SimVarValueType.Bool }],
+ ['fcuApproachModeActive', { name: PFDVars.fcuApproachModeActive, type: SimVarValueType.Bool }],
]);
public constructor(bus: EventBus) {