From 5d3514841d8c554bd1b7402e0a4295f01dd10f11 Mon Sep 17 00:00:00 2001 From: flogross89 <63071941+flogross89@users.noreply.github.com> Date: Sun, 28 Jul 2024 16:20:02 +0300 Subject: [PATCH] feat(a380x): TERR ON ND (#8778) * prepare EFIS CP and ND (cherry picked from commit 59ebb5a4b014054a5cf516853ef8b5328497e983) * change elec supply * add VD --- .../FlyByWire_A380_842/model/A380_COCKPIT.xml | 5 + .../model/behaviour/efis-cp.xml | 8 +- .../FlyByWire_A380_842/panel/panel.cfg | 6 +- .../instruments/src/Common/definitions.scss | 2 +- .../instruments/src/ND/NDSimvarPublisher.tsx | 71 +++--- .../instruments/src/ND/VerticalDisplay.tsx | 82 +++++++ .../systems/instruments/src/ND/instrument.tsx | 209 +++++++++--------- .../src/wasm/systems/a380_systems/src/lib.rs | 2 +- 8 files changed, 243 insertions(+), 142 deletions(-) create mode 100644 fbw-a380x/src/systems/instruments/src/ND/VerticalDisplay.tsx diff --git a/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/model/A380_COCKPIT.xml b/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/model/A380_COCKPIT.xml index 392940fd063..1cbe050ac96 100644 --- a/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/model/A380_COCKPIT.xml +++ b/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/model/A380_COCKPIT.xml @@ -128,6 +128,8 @@ 1 (>L:A32NX_EFIS_L_OPTION) } + (L:A380X_EFIS_L_ACTIVE_OVERLAY) 2 == (>L:A32NX_EFIS_TERR_L_ACTIVE) + (L:A380X_EFIS_R_ACTIVE_FILTER) 0 == if{ 3 (>L:A32NX_EFIS_R_OPTION) } @@ -148,6 +150,9 @@ 1 (>L:A32NX_EFIS_R_OPTION) } + (L:A380X_EFIS_R_ACTIVE_OVERLAY) 2 == (>L:A32NX_EFIS_TERR_R_ACTIVE) + + (O:PrevPot7Value) s0 (A:LIGHT POTENTIOMETER:7, Percent over 100) s1 diff --git a/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/model/behaviour/efis-cp.xml b/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/model/behaviour/efis-cp.xml index 349d23dfc5a..79ab52704b9 100644 --- a/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/model/behaviour/efis-cp.xml +++ b/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/model/behaviour/efis-cp.xml @@ -135,8 +135,8 @@ PUSH_EFIS_#SIDE_NODE_GROUP#_WX - 0 (>L:A380X_EFIS_#SIDE_SIMVAR_GROUP#_ACTIVE_OVERLAY) - (L:A380X_EFIS_#SIDE_SIMVAR_GROUP#_ACTIVE_OVERLAY) 0 == + (L:A380X_EFIS_#SIDE_SIMVAR_GROUP#_ACTIVE_OVERLAY) 1 == ! (>L:A380X_EFIS_#SIDE_SIMVAR_GROUP#_ACTIVE_OVERLAY) + (L:A380X_EFIS_#SIDE_SIMVAR_GROUP#_ACTIVE_OVERLAY) 1 == SELECT WX OVERLAY ON ND/VD @@ -145,8 +145,8 @@ PUSH_EFIS_#SIDE_NODE_GROUP#_TERR - 1 (>L:A380X_EFIS_#SIDE_SIMVAR_GROUP#_ACTIVE_OVERLAY) - (L:A380X_EFIS_#SIDE_SIMVAR_GROUP#_ACTIVE_OVERLAY) 1 == + (L:A380X_EFIS_#SIDE_SIMVAR_GROUP#_ACTIVE_OVERLAY) 2 == ! 2 * (>L:A380X_EFIS_#SIDE_SIMVAR_GROUP#_ACTIVE_OVERLAY) + (L:A380X_EFIS_#SIDE_SIMVAR_GROUP#_ACTIVE_OVERLAY) 2 == SELECT TERR OVERLAY ON ND diff --git a/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/panel.cfg b/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/panel.cfg index 2b665d9e9e8..490789dbfa3 100644 --- a/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/panel.cfg +++ b/fbw-a380x/src/base/flybywire-aircraft-a380-842/SimObjects/AirPlanes/FlyByWire_A380_842/panel/panel.cfg @@ -65,14 +65,16 @@ size_mm=768,1024 pixel_size=768,1024 texture=$SCREEN_DU_NDL -htmlgauge00=A380X/ND/nd.html?Index=1&duID=1, 0,0,768,1024 +htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=terronnd.wasm&wasm_gauge=terronnd,0,0,768,1024,L +htmlgauge01=A380X/ND/nd.html?Index=1&duID=1, 0,0,768,1024 [VCockpit08] size_mm=768,1024 pixel_size=768,1024 texture=$SCREEN_DU_NDR -htmlgauge00=A380X/ND/nd.html?Index=2?duID=4, 0,0,768,1024 +htmlgauge00=WasmInstrument/WasmInstrument.html?wasm_module=terronnd.wasm&wasm_gauge=terronnd,0,0,768,1024,R +htmlgauge01=A380X/ND/nd.html?Index=2?duID=4, 0,0,768,1024 [VCockpit09] size_mm=5120,5120 diff --git a/fbw-a380x/src/systems/instruments/src/Common/definitions.scss b/fbw-a380x/src/systems/instruments/src/Common/definitions.scss index 35e0f0d15b7..b3b4992765b 100644 --- a/fbw-a380x/src/systems/instruments/src/Common/definitions.scss +++ b/fbw-a380x/src/systems/instruments/src/Common/definitions.scss @@ -1,6 +1,6 @@ @font-face { font-family: 'Ecam'; - src: url(/Fonts/ECAMFontRegular.ttf); + src: url("/Fonts/FBW-Display-EIS-A380.ttf"); } $font-size-small: 14px; diff --git a/fbw-a380x/src/systems/instruments/src/ND/NDSimvarPublisher.tsx b/fbw-a380x/src/systems/instruments/src/ND/NDSimvarPublisher.tsx index 92757a90f88..f92191276a8 100644 --- a/fbw-a380x/src/systems/instruments/src/ND/NDSimvarPublisher.tsx +++ b/fbw-a380x/src/systems/instruments/src/ND/NDSimvarPublisher.tsx @@ -1,13 +1,14 @@ import { EventBus, SimVarDefinition, SimVarValueType } from '@microsoft/msfs-sdk'; import { - AdirsSimVarDefinitions, - AdirsSimVars, - SwitchingPanelSimVarsDefinitions, - SwitchingPanelVSimVars, + AdirsSimVarDefinitions, + AdirsSimVars, + SwitchingPanelSimVarsDefinitions, + SwitchingPanelVSimVars, } from '../MsfsAvionicsCommon/SimVarTypes'; import { UpdatableSimVarPublisher } from '../MsfsAvionicsCommon/UpdatableSimVarPublisher'; -export type NDSimvars = AdirsSimVars & SwitchingPanelVSimVars & { +export type NDSimvars = AdirsSimVars & + SwitchingPanelVSimVars & { elec: boolean; elecFo: boolean; potentiometerCaptain: number; @@ -19,41 +20,41 @@ export type NDSimvars = AdirsSimVars & SwitchingPanelVSimVars & { pposLat: Degrees; pposLong: Degrees; absoluteTime: Seconds; - } + }; export enum NDVars { - elec = 'L:A32NX_ELEC_AC_ESS_BUS_IS_POWERED', - elecFo = 'L:A32NX_ELEC_AC_2_BUS_IS_POWERED', - potentiometerCaptain = 'LIGHT POTENTIOMETER:89', - potentiometerFo = 'LIGHT POTENTIOMETER:91', - ilsCourse = 'L:A32NX_FM_LS_COURSE', - selectedWaypointLat = 'L:A32NX_SELECTED_WAYPOINT_LAT', - selectedWaypointLong = 'L:A32NX_SELECTED_WAYPOINT_LONG', - selectedHeading = 'L:A32NX_FCU_HEADING_SELECTED', - pposLat = 'PLANE LATITUDE', // TODO replace with fm position - pposLong = 'PLANE LONGITUDE', // TODO replace with fm position - absoluteTime = 'E:ABSOLUTE TIME', + elec = 'L:A32NX_ELEC_AC_ESS_BUS_IS_POWERED', + elecFo = 'L:A32NX_ELEC_AC_2_BUS_IS_POWERED', + potentiometerCaptain = 'LIGHT POTENTIOMETER:89', + potentiometerFo = 'LIGHT POTENTIOMETER:91', + ilsCourse = 'L:A32NX_FM_LS_COURSE', + selectedWaypointLat = 'L:A32NX_SELECTED_WAYPOINT_LAT', + selectedWaypointLong = 'L:A32NX_SELECTED_WAYPOINT_LONG', + selectedHeading = 'L:A32NX_FCU_HEADING_SELECTED', + pposLat = 'PLANE LATITUDE', // TODO replace with fm position + pposLong = 'PLANE LONGITUDE', // TODO replace with fm position + absoluteTime = 'E:ABSOLUTE TIME', } /** A publisher to poll and publish nav/com simvars. */ export class NDSimvarPublisher extends UpdatableSimVarPublisher { - private static simvars = new Map([ - ...AdirsSimVarDefinitions, - ...SwitchingPanelSimVarsDefinitions, - ['elec', { name: NDVars.elec, type: SimVarValueType.Bool }], - ['elecFo', { name: NDVars.elecFo, type: SimVarValueType.Bool }], - ['potentiometerCaptain', { name: NDVars.potentiometerCaptain, type: SimVarValueType.Number }], - ['potentiometerFo', { name: NDVars.potentiometerFo, type: SimVarValueType.Number }], - ['ilsCourse', { name: NDVars.ilsCourse, type: SimVarValueType.Number }], - ['selectedWaypointLat', { name: NDVars.selectedWaypointLat, type: SimVarValueType.Degree }], - ['selectedWaypointLong', { name: NDVars.selectedWaypointLong, type: SimVarValueType.Degree }], - ['selectedHeading', { name: NDVars.selectedHeading, type: SimVarValueType.Degree }], - ['pposLat', { name: NDVars.pposLat, type: SimVarValueType.Degree }], - ['pposLong', { name: NDVars.pposLong, type: SimVarValueType.Degree }], - ['absoluteTime', { name: NDVars.absoluteTime, type: SimVarValueType.Seconds }], - ]) + private static simvars = new Map([ + ...AdirsSimVarDefinitions, + ...SwitchingPanelSimVarsDefinitions, + ['elec', { name: NDVars.elec, type: SimVarValueType.Bool }], + ['elecFo', { name: NDVars.elecFo, type: SimVarValueType.Bool }], + ['potentiometerCaptain', { name: NDVars.potentiometerCaptain, type: SimVarValueType.Number }], + ['potentiometerFo', { name: NDVars.potentiometerFo, type: SimVarValueType.Number }], + ['ilsCourse', { name: NDVars.ilsCourse, type: SimVarValueType.Number }], + ['selectedWaypointLat', { name: NDVars.selectedWaypointLat, type: SimVarValueType.Degree }], + ['selectedWaypointLong', { name: NDVars.selectedWaypointLong, type: SimVarValueType.Degree }], + ['selectedHeading', { name: NDVars.selectedHeading, type: SimVarValueType.Degree }], + ['pposLat', { name: NDVars.pposLat, type: SimVarValueType.Degree }], + ['pposLong', { name: NDVars.pposLong, type: SimVarValueType.Degree }], + ['absoluteTime', { name: NDVars.absoluteTime, type: SimVarValueType.Seconds }], + ]); - public constructor(bus: EventBus) { - super(NDSimvarPublisher.simvars, bus); - } + public constructor(bus: EventBus) { + super(NDSimvarPublisher.simvars, bus); + } } diff --git a/fbw-a380x/src/systems/instruments/src/ND/VerticalDisplay.tsx b/fbw-a380x/src/systems/instruments/src/ND/VerticalDisplay.tsx new file mode 100644 index 00000000000..291f214d4ff --- /dev/null +++ b/fbw-a380x/src/systems/instruments/src/ND/VerticalDisplay.tsx @@ -0,0 +1,82 @@ +import { + A380EfisNdRangeValue, + ArincEventBus, + EfisNdMode, + EfisSide, + a380EfisRangeSettings, +} from '@flybywiresim/fbw-sdk'; +import { ComponentProps, DisplayComponent, FSComponent, VNode } from '@microsoft/msfs-sdk'; + +export interface VerticalDisplayProps extends ComponentProps { + bus: ArincEventBus; + side: EfisSide; +} + +export interface GenericFcuEvents { + ndMode: EfisNdMode; + ndRangeSetting: A380EfisNdRangeValue; +} + +export class VerticalDisplayDummy extends DisplayComponent { + private topRef = FSComponent.createRef(); + + private ndMode: EfisNdMode = EfisNdMode.ARC; + + private ndRangeSetting: A380EfisNdRangeValue = 10; + + private updateVisibility() { + if (this.ndMode === EfisNdMode.PLAN) { + this.topRef.instance.style.display = 'none'; + } else if (this.ndRangeSetting === -1) { + this.topRef.instance.style.display = 'none'; + } else { + this.topRef.instance.style.display = 'block'; + } + } + + public onAfterRender(node: VNode): void { + super.onAfterRender(node); + + const sub = this.props.bus.getSubscriber(); + + sub + .on('ndMode') + .whenChanged() + .handle((mode) => { + this.ndMode = mode; + this.updateVisibility(); + }); + + sub + .on('ndRangeSetting') + .whenChanged() + .handle((range) => { + this.ndRangeSetting = a380EfisRangeSettings[range]; + this.updateVisibility(); + }); + } + + render(): VNode { + return ( + + + + + + + + + + + + + + + + + + + + ); + } +} diff --git a/fbw-a380x/src/systems/instruments/src/ND/instrument.tsx b/fbw-a380x/src/systems/instruments/src/ND/instrument.tsx index a87e71dc726..b5b4146e05a 100644 --- a/fbw-a380x/src/systems/instruments/src/ND/instrument.tsx +++ b/fbw-a380x/src/systems/instruments/src/ND/instrument.tsx @@ -2,7 +2,15 @@ // // SPDX-License-Identifier: GPL-3.0 -import { Clock, FsBaseInstrument, FSComponent, FsInstrument, HEventPublisher, InstrumentBackplane, Subject } from '@microsoft/msfs-sdk'; +import { + Clock, + FsBaseInstrument, + FSComponent, + FsInstrument, + HEventPublisher, + InstrumentBackplane, + Subject, +} from '@microsoft/msfs-sdk'; import { a380EfisRangeSettings, ArincEventBus, EfisSide } from '@flybywiresim/fbw-sdk'; import { NDComponent } from '@flybywiresim/navigation-display'; @@ -21,141 +29,144 @@ import { FMBusPublisher } from '../MsfsAvionicsCommon/providers/FMBusPublisher'; import { FcuBusPublisher } from '../MsfsAvionicsCommon/providers/FcuBusPublisher'; import './style.scss'; +import { VerticalDisplayDummy } from 'instruments/src/ND/VerticalDisplay'; class NDInstrument implements FsInstrument { - public readonly instrument: BaseInstrument; + public readonly instrument: BaseInstrument; - private readonly efisSide: EfisSide; + private readonly efisSide: EfisSide; - private readonly bus: ArincEventBus; + private readonly bus: ArincEventBus; - private readonly backplane = new InstrumentBackplane(); + private readonly backplane = new InstrumentBackplane(); - private readonly simVarPublisher: NDSimvarPublisher; + private readonly simVarPublisher: NDSimvarPublisher; - private readonly fcuBusPublisher: FcuBusPublisher; + private readonly fcuBusPublisher: FcuBusPublisher; - private readonly fmsDataPublisher: FmsDataPublisher; + private readonly fmsDataPublisher: FmsDataPublisher; - private readonly fgDataPublisher: FGDataPublisher; + private readonly fgDataPublisher: FGDataPublisher; - private readonly fmBusPublisher: FMBusPublisher; + private readonly fmBusPublisher: FMBusPublisher; - private readonly fmsSymbolsPublisher: FmsSymbolsPublisher; + private readonly fmsSymbolsPublisher: FmsSymbolsPublisher; - private readonly vorBusPublisher: VorBusPublisher; + private readonly vorBusPublisher: VorBusPublisher; - private readonly tcasBusPublisher: TcasBusPublisher; + private readonly tcasBusPublisher: TcasBusPublisher; - private readonly dmcPublisher: DmcPublisher; + private readonly dmcPublisher: DmcPublisher; - private readonly egpwcBusPublisher: EgpwcBusPublisher; + private readonly egpwcBusPublisher: EgpwcBusPublisher; - private readonly hEventPublisher; + private readonly hEventPublisher; - private readonly adirsValueProvider: AdirsValueProvider; + private readonly adirsValueProvider: AdirsValueProvider; - private readonly clock: Clock; + private readonly clock: Clock; - constructor() { - const side: EfisSide = getDisplayIndex() === 1 ? 'L' : 'R'; - const stateSubject = Subject.create<'L' | 'R'>(side); - this.efisSide = side; + constructor() { + const side: EfisSide = getDisplayIndex() === 1 ? 'L' : 'R'; + const stateSubject = Subject.create<'L' | 'R'>(side); + this.efisSide = side; - this.bus = new ArincEventBus(); + this.bus = new ArincEventBus(); - this.simVarPublisher = new NDSimvarPublisher(this.bus); - this.fcuBusPublisher = new FcuBusPublisher(this.bus, side); - this.fmsDataPublisher = new FmsDataPublisher(this.bus, stateSubject); - this.fgDataPublisher = new FGDataPublisher(this.bus); - this.fmBusPublisher = new FMBusPublisher(this.bus); - this.fmsSymbolsPublisher = new FmsSymbolsPublisher(this.bus, side); - this.vorBusPublisher = new VorBusPublisher(this.bus); - this.tcasBusPublisher = new TcasBusPublisher(this.bus); - this.dmcPublisher = new DmcPublisher(this.bus); - this.egpwcBusPublisher = new EgpwcBusPublisher(this.bus, side); - this.hEventPublisher = new HEventPublisher(this.bus); + this.simVarPublisher = new NDSimvarPublisher(this.bus); + this.fcuBusPublisher = new FcuBusPublisher(this.bus, side); + this.fmsDataPublisher = new FmsDataPublisher(this.bus, stateSubject); + this.fgDataPublisher = new FGDataPublisher(this.bus); + this.fmBusPublisher = new FMBusPublisher(this.bus); + this.fmsSymbolsPublisher = new FmsSymbolsPublisher(this.bus, side); + this.vorBusPublisher = new VorBusPublisher(this.bus); + this.tcasBusPublisher = new TcasBusPublisher(this.bus); + this.dmcPublisher = new DmcPublisher(this.bus); + this.egpwcBusPublisher = new EgpwcBusPublisher(this.bus, side); + this.hEventPublisher = new HEventPublisher(this.bus); - this.adirsValueProvider = new AdirsValueProvider(this.bus, this.simVarPublisher, side); + this.adirsValueProvider = new AdirsValueProvider(this.bus, this.simVarPublisher, side); - this.clock = new Clock(this.bus); + this.clock = new Clock(this.bus); - this.backplane.addPublisher('ndSimVars', this.simVarPublisher); - this.backplane.addPublisher('fcu', this.fcuBusPublisher); - this.backplane.addPublisher('fms', this.fmsDataPublisher); - this.backplane.addPublisher('fg', this.fgDataPublisher); - this.backplane.addPublisher('fms-arinc', this.fmBusPublisher); - this.backplane.addPublisher('fms-symbols', this.fmsSymbolsPublisher); - this.backplane.addPublisher('vor', this.vorBusPublisher); - this.backplane.addPublisher('tcas', this.tcasBusPublisher); - this.backplane.addPublisher('dmc', this.dmcPublisher); - this.backplane.addPublisher('egpwc', this.egpwcBusPublisher); + this.backplane.addPublisher('ndSimVars', this.simVarPublisher); + this.backplane.addPublisher('fcu', this.fcuBusPublisher); + this.backplane.addPublisher('fms', this.fmsDataPublisher); + this.backplane.addPublisher('fg', this.fgDataPublisher); + this.backplane.addPublisher('fms-arinc', this.fmBusPublisher); + this.backplane.addPublisher('fms-symbols', this.fmsSymbolsPublisher); + this.backplane.addPublisher('vor', this.vorBusPublisher); + this.backplane.addPublisher('tcas', this.tcasBusPublisher); + this.backplane.addPublisher('dmc', this.dmcPublisher); + this.backplane.addPublisher('egpwc', this.egpwcBusPublisher); - this.backplane.addInstrument('clock', this.clock); + this.backplane.addInstrument('clock', this.clock); - this.doInit(); - } - - private doInit(): void { - this.backplane.init(); + this.doInit(); + } - this.adirsValueProvider.start(); + private doInit(): void { + this.backplane.init(); - FSComponent.render( - - - , - document.getElementById('ND_CONTENT'), - ); + this.adirsValueProvider.start(); - // Remove "instrument didn't load" text - document.getElementById('ND_CONTENT').querySelector(':scope > h1').remove(); - } + FSComponent.render( + + + + , + document.getElementById('ND_CONTENT'), + ); - /** - * A callback called when the instrument gets a frame update. - */ - public Update(): void { - this.backplane.onUpdate(); - } + // Remove "instrument didn't load" text + document.getElementById('ND_CONTENT').querySelector(':scope > h1').remove(); + } - public onInteractionEvent(args: string[]): void { - if (args[0].endsWith(`A32NX_EFIS_${this.efisSide}_CHRONO_PUSHED`)) { - this.bus.getPublisher().pub('chrono_pushed', undefined); - } + /** + * A callback called when the instrument gets a frame update. + */ + public Update(): void { + this.backplane.onUpdate(); + } - this.hEventPublisher.dispatchHEvent(args[0]); + public onInteractionEvent(args: string[]): void { + if (args[0].endsWith(`A32NX_EFIS_${this.efisSide}_CHRONO_PUSHED`)) { + this.bus.getPublisher().pub('chrono_pushed', undefined); } - onGameStateChanged(_oldState: GameState, _newState: GameState) { - // noop - } + this.hEventPublisher.dispatchHEvent(args[0]); + } - onFlightStart() { - // noop - } + onGameStateChanged(_oldState: GameState, _newState: GameState) { + // noop + } - onSoundEnd(_soundEventId: Name_Z) { - // noop - } + onFlightStart() { + // noop + } + + onSoundEnd(_soundEventId: Name_Z) { + // noop + } } class A380X_ND extends FsBaseInstrument { - constructInstrument(): NDInstrument { - return new NDInstrument(); - } + constructInstrument(): NDInstrument { + return new NDInstrument(); + } - get isInteractive(): boolean { - return false; - } + get isInteractive(): boolean { + return false; + } - get templateID(): string { - return 'A380X_ND'; - } + get templateID(): string { + return 'A380X_ND'; + } } // Hack to support tspan SVG elements, which FSComponent does not recognise as SVG @@ -165,10 +176,10 @@ const original = document.createElement.bind(document); const extraSvgTags = ['tspan']; document.createElement = ((tagName, options) => { - if (extraSvgTags.includes(tagName)) { - return document.createElementNS('http://www.w3.org/2000/svg', tagName, options); - } - return original(tagName, options); + if (extraSvgTags.includes(tagName)) { + return document.createElementNS('http://www.w3.org/2000/svg', tagName, options); + } + return original(tagName, options); }) as any; registerInstrument('a380x-nd', A380X_ND); diff --git a/fbw-a380x/src/wasm/systems/a380_systems/src/lib.rs b/fbw-a380x/src/wasm/systems/a380_systems/src/lib.rs index fe42075358f..9169260b934 100644 --- a/fbw-a380x/src/wasm/systems/a380_systems/src/lib.rs +++ b/fbw-a380x/src/wasm/systems/a380_systems/src/lib.rs @@ -143,7 +143,7 @@ impl A380 { cds: A380ControlDisplaySystem::new(context), egpwc: EnhancedGroundProximityWarningComputer::new( context, - ElectricalBusType::DirectCurrent(1), + ElectricalBusType::AlternatingCurrentEssential, vec![ Length::new::(0.0), Length::new::(10.0),