diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md
index e6fcd8ae2f6..5d4f465d22e 100644
--- a/.github/CHANGELOG.md
+++ b/.github/CHANGELOG.md
@@ -107,6 +107,7 @@
1. [A380X/ENGINES] Adjust climb thrust to be more accurate - @BlueberryKing (BlueberryKing)
1. [A380X/EWD] Show THR limit in EWD instead of N1 - @flogross89 (floridude)
1. [A380X/FLIGHT MODEL] Fix pitchup and unrecoverable stall - - @donstim (donbikes#4084)
+1. [PFD] Add LS button reminder - @BravoMike99 (bruno_pt99)
## 0.12.0
diff --git a/fbw-a32nx/src/systems/instruments/src/PFD/LandingSystemIndicator.tsx b/fbw-a32nx/src/systems/instruments/src/PFD/LandingSystemIndicator.tsx
index 8de2a9b9640..9cead80f4db 100644
--- a/fbw-a32nx/src/systems/instruments/src/PFD/LandingSystemIndicator.tsx
+++ b/fbw-a32nx/src/systems/instruments/src/PFD/LandingSystemIndicator.tsx
@@ -15,13 +15,16 @@ import {
Subscription,
VNode,
} from '@microsoft/msfs-sdk';
-import { ArincEventBus, Arinc429RegisterSubject, MathUtils } from '@flybywiresim/fbw-sdk';
+import { ArincEventBus, Arinc429RegisterSubject, MathUtils, Arinc429ConsumerSubject } from '@flybywiresim/fbw-sdk';
import { getDisplayIndex } from 'instruments/src/PFD/PFD';
import { FcuBus } from 'instruments/src/PFD/shared/FcuBusProvider';
import { Arinc429Values } from './shared/ArincValueProvider';
import { PFDSimvars } from './shared/PFDSimvarPublisher';
import { LagFilter } from './PFDUtils';
+import { FmgcFlightPhase } from '@shared/flightphase';
+import { FlashOneHertz } from '../MsfsAvionicsCommon/FlashingElementUtils';
+import { FgBus } from './shared/FgBusProvider';
// FIXME true ref
export class LandingSystem extends DisplayComponent<{ bus: ArincEventBus; instrument: BaseInstrument }> {
@@ -92,6 +95,9 @@ export class LandingSystem extends DisplayComponent<{ bus: ArincEventBus; instru
d="m 114.84887,80.06669 v 1.51188 h -8.43284 v -1.51188 z"
/>
+
+
+
@@ -741,3 +747,59 @@ class MarkerBeaconIndicator extends DisplayComponent<{ bus: ArincEventBus }> {
);
}
}
+
+class LsReminderIndicator extends DisplayComponent<{ bus: ArincEventBus }> {
+ private readonly sub = this.props.bus.getSubscriber();
+
+ private readonly glsMlsFlsOrLocVnavInstalled = Subject.create(false);
+
+ private readonly fwcFlightPhase = ConsumerSubject.create(this.sub.on('fwcFlightPhase'), 0);
+
+ private readonly fmgcFlightPhase = ConsumerSubject.create(this.sub.on('fmgcFlightPhase'), FmgcFlightPhase.Preflight);
+
+ private readonly fmgcDiscreteWord2 = Arinc429ConsumerSubject.create(this.sub.on('fmgcDiscreteWord3'));
+
+ private readonly fmgcDiscreteWord4 = Arinc429ConsumerSubject.create(this.sub.on('fmgcDiscreteWord4'));
+
+ private readonly landModeArmedOrActive = MappedSubject.create(
+ ([fmgcDiscreteWord2, fmgcDiscreteWord4]) =>
+ fmgcDiscreteWord4.bitValueOr(14, false) || fmgcDiscreteWord2.bitValueOr(20, false),
+ this.fmgcDiscreteWord2,
+ this.fmgcDiscreteWord4,
+ );
+
+ private readonly fcuEisDiscreteWord2 = Arinc429ConsumerSubject.create(this.sub.on('fcuEisDiscreteWord2'));
+
+ private readonly lsPushed = this.fcuEisDiscreteWord2.map((w) => w.bitValueOr(22, false));
+
+ private readonly lsReminderVisible = MappedSubject.create(
+ ([fwcPhase, fmgcPhase, landModeArmedOrActive, lsPushed]) => {
+ return (
+ landModeArmedOrActive &&
+ fmgcPhase === FmgcFlightPhase.Approach &&
+ !lsPushed && // TODO Check if LOC or G/S scales are invalid
+ fwcPhase !== 8 &&
+ fwcPhase !== 9 &&
+ fwcPhase !== 10
+ );
+ },
+ this.fwcFlightPhase,
+ this.fmgcFlightPhase,
+ this.landModeArmedOrActive,
+ this.lsPushed,
+ );
+
+ onAfterRender(node: VNode): void {
+ super.onAfterRender(node);
+ }
+
+ render(): VNode {
+ return (
+
+
+ {this.glsMlsFlsOrLocVnavInstalled.map((v) => (v ? 'LS' : 'ILS'))}
+
+
+ );
+ }
+}
diff --git a/fbw-a380x/src/systems/instruments/src/PFD/LandingSystemIndicator.tsx b/fbw-a380x/src/systems/instruments/src/PFD/LandingSystemIndicator.tsx
index ffb26b26731..7a7d6b2fa50 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,71 @@ 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 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 (
+
+ LS
+
+ );
+ }
+}
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 de69cc28db8..da27bf833b9 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) {