diff --git a/.github/CHANGELOG.md b/.github/CHANGELOG.md index 582bca45919..a668986d4fe 100644 --- a/.github/CHANGELOG.md +++ b/.github/CHANGELOG.md @@ -61,6 +61,7 @@ 1. [A32NX/FMGC] Implemented simulated FCU computers - @lukecologne (luke) 1. [A380X/ENGINES] Corrected ENG4 throttle variable typo - @rthom91 (Randy Thom) 1. [ND] Fixed track line not visible in GA TRK, RWY TRK and RWY modes - @ta-dzik (ta_dzik) +1. [A380X/FMS] Added SURV Status & Switching page with TCAS fault indication - @Frenkii (Moritz) ## 0.12.0 diff --git a/fbw-a380x/src/systems/instruments/src/MFD/MfdPageDirectory.tsx b/fbw-a380x/src/systems/instruments/src/MFD/MfdPageDirectory.tsx index 2d2f36e02d8..95e612bf00b 100644 --- a/fbw-a380x/src/systems/instruments/src/MFD/MfdPageDirectory.tsx +++ b/fbw-a380x/src/systems/instruments/src/MFD/MfdPageDirectory.tsx @@ -28,6 +28,7 @@ import { MfdDisplayInterface } from 'instruments/src/MFD/MFD'; import { MfdUiService } from 'instruments/src/MFD/pages/common/MfdUiService'; import { MfdFmsDataDebug } from 'instruments/src/MFD/pages/FMS/DATA/MfdFmsDataDebug'; import { MfdSurvControls } from 'instruments/src/MFD/pages/SURV/MfdSurvControls'; +import { MfdSurvStatusSwitching } from 'instruments/src/MFD/pages/SURV/MfdSurvStatusSwitching'; export function pageForUrl( url: string, @@ -93,6 +94,8 @@ export function pageForUrl( return ; case 'surv/controls': return ; + case 'surv/status-switching': + return ; case 'atccom/connect': return ; diff --git a/fbw-a380x/src/systems/instruments/src/MFD/pages/SURV/MfdSurvStatusSwitching.scss b/fbw-a380x/src/systems/instruments/src/MFD/pages/SURV/MfdSurvStatusSwitching.scss new file mode 100644 index 00000000000..baacd3a1acb --- /dev/null +++ b/fbw-a380x/src/systems/instruments/src/MFD/pages/SURV/MfdSurvStatusSwitching.scss @@ -0,0 +1,31 @@ +@import "../../../MsfsAvionicsCommon/definitions.scss"; + + +.sys-box { + border: 1px solid $display-light-grey; + padding: 10px; + padding-top: 50px; + width: 270px; + position: relative; +} + +.sys-box.active { + border: 1px solid $display-green; +} + +.sys-group { + border: 1px solid $display-light-grey; + padding: 5px; +} + +.sys-group.active { + border: 1px solid $display-green; +} + +.sys-group.failed { + border: 1px solid $display-amber; +} + +.sys-status-item.failed { + color: $display-amber; +} diff --git a/fbw-a380x/src/systems/instruments/src/MFD/pages/SURV/MfdSurvStatusSwitching.tsx b/fbw-a380x/src/systems/instruments/src/MFD/pages/SURV/MfdSurvStatusSwitching.tsx new file mode 100644 index 00000000000..0315ab9a945 --- /dev/null +++ b/fbw-a380x/src/systems/instruments/src/MFD/pages/SURV/MfdSurvStatusSwitching.tsx @@ -0,0 +1,224 @@ +import { ConsumerSubject, DisplayComponent, FSComponent, Subject, Subscription, VNode } from '@microsoft/msfs-sdk'; + +import './MfdSurvStatusSwitching.scss'; + +import { MfdSurvEvents } from 'instruments/src/MsfsAvionicsCommon/providers/MfdSurvPublisher'; +import { ActivePageTitleBar } from 'instruments/src/MFD/pages/common/ActivePageTitleBar'; +import { AbstractMfdPageProps } from 'instruments/src/MFD/MFD'; +import { Footer } from 'instruments/src/MFD/pages/common/Footer'; +import { MfdSimvars } from 'instruments/src/MFD/shared/MFDSimvarPublisher'; +import { SurvStatusButton } from 'instruments/src/MFD/pages/common/SurvStatusButton'; +import { SurvStatusItem } from 'instruments/src/MFD/pages/common/SurvStatusItem'; + +interface MfdSurvStatusSwitchingProps extends AbstractMfdPageProps {} + +export enum StatusItemState { + Off = 0, + On = 1, + Failed = 2, +} + +export class MfdSurvStatusSwitching extends DisplayComponent { + // Make sure to collect all subscriptions here, otherwise page navigation doesn't work. + private subs = [] as Subscription[]; + + private readonly sub = this.props.bus.getSubscriber(); + + private readonly tcas1Failed = ConsumerSubject.create(this.sub.on('tcasFail'), true); + + private readonly wxr1Failed = Subject.create(false); + + private readonly turb1Failed = Subject.create(false); + + private readonly predWs1Failed = Subject.create(false); + + private readonly xpdr1Failed = Subject.create(false); + + private readonly terr1Failed = Subject.create(false); + + private readonly gpws1Failed = Subject.create(false); + + private readonly wxr2Failed = Subject.create(false); + + private readonly turb2Failed = Subject.create(false); + + private readonly predWs2Failed = Subject.create(false); + + private readonly terr2Failed = Subject.create(false); + + private readonly gpws2Failed = Subject.create(false); + + private readonly xpdr2Failed = Subject.create(false); + + private readonly tcas2Failed = Subject.create(false); + + private readonly activeSystemGroupXpdrTcas = Subject.create(1); + + private readonly activeSystemGroupXpdr = Subject.create(1); + + private readonly activeSystemGroupTcas = Subject.create(1); + + public onAfterRender(node: VNode): void { + super.onAfterRender(node); + } + + public destroy(): void { + // Destroy all subscriptions to remove all references to this instance. + this.subs.forEach((x) => x.destroy()); + + super.destroy(); + } + + render(): VNode { + return ( + <> + + {/* begin page content */} +
+
+ {/* upper left sys box */} +
+ console.log('button clicked')} + /> +
+ + + +
+
+ + +
+
+ {/* upper middle text */} +
+
+ WXR +
+
+ TAWS +
+
+ {/* upper right sys box */} +
+ console.log('button clicked')} + /> +
+ + + +
+
+ + +
+
+
+ {/* lower line */} +
+ {/* lower left sys box */} +
+ +
+ +
+
+ +
+
+ {/* lower middle text */} +
+
+ XPDR +
+
+ TCAS +
+
+ {/* lower right sys box */} +
+ console.log('button clicked')} + /> +
+ +
+
+ +
+
+
+
+ {/* end page content */} +