diff --git a/fbw-a32nx/src/systems/instruments/src/ND/config.json b/fbw-a32nx/src/systems/instruments/src/ND/config.json deleted file mode 100644 index c6b25cae63a..00000000000 --- a/fbw-a32nx/src/systems/instruments/src/ND/config.json +++ /dev/null @@ -1,7 +0,0 @@ -{ - "index": "./index.tsx", - "isInteractive": false, - "additionalImports": [ - "/JS/fbw-a32nx/fmgc/LzUtf8.js" - ] -} diff --git a/fbw-a32nx/src/systems/instruments/src/ND/DebugInfo.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/DebugInfo.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/DebugInfo.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/DebugInfo.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/elements/Chrono.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/Chrono.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/elements/Chrono.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/Chrono.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/elements/CrossTrack.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/CrossTrack.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/elements/CrossTrack.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/CrossTrack.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/elements/FlightPlan.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/FlightPlan.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/elements/FlightPlan.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/FlightPlan.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/elements/FlightPlanVectors.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/FlightPlanVectors.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/elements/FlightPlanVectors.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/FlightPlanVectors.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/elements/LnavStatus.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/LnavStatus.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/elements/LnavStatus.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/LnavStatus.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/elements/RadioNavInfo.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/RadioNavInfo.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/elements/RadioNavInfo.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/RadioNavInfo.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/elements/RadioNeedles.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/RadioNeedles.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/elements/RadioNeedles.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/RadioNeedles.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/elements/SpeedIndicator.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/SpeedIndicator.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/elements/SpeedIndicator.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/SpeedIndicator.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/elements/TerrainMapThresholds.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/TerrainMapThresholds.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/elements/TerrainMapThresholds.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/TerrainMapThresholds.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/elements/ToWaypointIndicator.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/ToWaypointIndicator.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/elements/ToWaypointIndicator.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/ToWaypointIndicator.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/elements/TopMessages.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/TopMessages.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/elements/TopMessages.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/TopMessages.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/elements/TrackLine.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/TrackLine.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/elements/TrackLine.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/TrackLine.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/elements/Traffic.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/Traffic.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/elements/Traffic.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/Traffic.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/elements/WindIndicator.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/WindIndicator.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/elements/WindIndicator.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/WindIndicator.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/elements/messages/FMMessages.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/messages/FMMessages.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/elements/messages/FMMessages.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/messages/FMMessages.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/elements/messages/NavigationDisplayMessages.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/messages/NavigationDisplayMessages.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/elements/messages/NavigationDisplayMessages.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/messages/NavigationDisplayMessages.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/elements/messages/TcasWxrMessages.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/messages/TcasWxrMessages.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/elements/messages/TcasWxrMessages.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/elements/messages/TcasWxrMessages.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/index.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/index.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/index.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/index.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/pages/ArcMode.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/pages/ArcMode.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/pages/ArcMode.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/pages/ArcMode.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/pages/PlanMode.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/pages/PlanMode.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/pages/PlanMode.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/pages/PlanMode.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/pages/RoseMode.tsx b/fbw-a32nx/src/systems/instruments/src/ND_legacy/pages/RoseMode.tsx similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/pages/RoseMode.tsx rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/pages/RoseMode.tsx diff --git a/fbw-a32nx/src/systems/instruments/src/ND/styles.scss b/fbw-a32nx/src/systems/instruments/src/ND_legacy/styles.scss similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/styles.scss rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/styles.scss diff --git a/fbw-a32nx/src/systems/instruments/src/ND/utils/MapParameters.ts b/fbw-a32nx/src/systems/instruments/src/ND_legacy/utils/MapParameters.ts similarity index 100% rename from fbw-a32nx/src/systems/instruments/src/ND/utils/MapParameters.ts rename to fbw-a32nx/src/systems/instruments/src/ND_legacy/utils/MapParameters.ts diff --git a/fbw-a32nx/src/systems/instruments/src/NDv2/ND.tsx b/fbw-a32nx/src/systems/instruments/src/NDv2/ND.tsx index b19e3247501..e4325f66093 100644 --- a/fbw-a32nx/src/systems/instruments/src/NDv2/ND.tsx +++ b/fbw-a32nx/src/systems/instruments/src/NDv2/ND.tsx @@ -327,7 +327,7 @@ export class NDComponent extends DisplayComponent { /> - + diff --git a/fbw-a32nx/src/systems/instruments/src/NDv2/config.json b/fbw-a32nx/src/systems/instruments/src/NDv2/config.json new file mode 100644 index 00000000000..ade492578f8 --- /dev/null +++ b/fbw-a32nx/src/systems/instruments/src/NDv2/config.json @@ -0,0 +1,4 @@ +{ + "index": "./instrument.tsx", + "isInteractive": false +} diff --git a/fbw-a32nx/src/systems/instruments/src/NDv2/pages/arc/LubberLine.tsx b/fbw-a32nx/src/systems/instruments/src/NDv2/pages/arc/LubberLine.tsx index 8ad68033621..a9a7e091065 100644 --- a/fbw-a32nx/src/systems/instruments/src/NDv2/pages/arc/LubberLine.tsx +++ b/fbw-a32nx/src/systems/instruments/src/NDv2/pages/arc/LubberLine.tsx @@ -1,10 +1,11 @@ import { FSComponent, DisplayComponent, VNode, EventBus, Subscribable } from '@microsoft/msfs-sdk'; +import { EfisNdMode } from '@shared/NavigationDisplay'; export interface LubberLineProps { bus: EventBus, visible: Subscribable, - + ndMode: Subscribable, rotation: Subscribable, } @@ -19,9 +20,9 @@ export class LubberLine extends DisplayComponent { > (mode === EfisNdMode.ARC ? 108 : 116))} x2={384} - y2={152} + y2={this.props.ndMode.map((mode) => (mode === EfisNdMode.ARC ? 148 : 152))} class="shadow" stroke-width={5.5} stroke-linejoin="round" @@ -29,9 +30,9 @@ export class LubberLine extends DisplayComponent { /> (mode === EfisNdMode.ARC ? 108 : 116))} x2={384} - y2={152} + y2={this.props.ndMode.map((mode) => (mode === EfisNdMode.ARC ? 148 : 152))} class="Yellow" stroke-width={5} stroke-linejoin="round" diff --git a/fbw-a32nx/src/systems/instruments/src/NDv2/shared/Airplane.tsx b/fbw-a32nx/src/systems/instruments/src/NDv2/shared/Airplane.tsx index 20f3b8f291a..322d81be249 100644 --- a/fbw-a32nx/src/systems/instruments/src/NDv2/shared/Airplane.tsx +++ b/fbw-a32nx/src/systems/instruments/src/NDv2/shared/Airplane.tsx @@ -89,7 +89,7 @@ export class Airplane extends DisplayComponent<{ bus: EventBus, ndMode: Subscrib /> - + ); } diff --git a/fbw-a32nx/src/systems/instruments/src/NDv2/shared/TrackBug.tsx b/fbw-a32nx/src/systems/instruments/src/NDv2/shared/TrackBug.tsx index 9fee48f36f3..eaa08b445af 100644 --- a/fbw-a32nx/src/systems/instruments/src/NDv2/shared/TrackBug.tsx +++ b/fbw-a32nx/src/systems/instruments/src/NDv2/shared/TrackBug.tsx @@ -3,6 +3,7 @@ import { DisplayComponent, EventBus, FSComponent, + MappedSubject, Subject, Subscribable, VNode, @@ -17,6 +18,7 @@ import { FcuSimVars } from '../../MsfsAvionicsCommon/providers/FcuBusPublisher'; export interface TrackBugProps { bus: EventBus, isUsingTrackUpMode: Subscribable, + ndMode: Subscribable, } export class TrackBug extends DisplayComponent { @@ -30,6 +32,10 @@ export class TrackBug extends DisplayComponent { private readonly bugShown = Subject.create(false); + private readonly transformSubject = MappedSubject.create(([diff, ndMode]) => { + return `rotate(${diff} 384 ${ndMode === EfisNdMode.ARC ? 620 : 384})`; + }, this.diffSubject, this.props.ndMode); + onAfterRender(node: VNode) { super.onAfterRender(node); @@ -69,15 +75,15 @@ export class TrackBug extends DisplayComponent { return ( (v ? 'inherit' : 'hidden'))} - transform={this.diffSubject.map((diff) => `rotate(${diff} 384 620)`)} + transform={this.transformSubject} > (ndMode !== EfisNdMode.ARC ? 'M384,134 L379,143 L384,152 L389,143 L384,134' : 'M384,128 L378,138 L384,148 L390,138 L384,128'))} class="rounded shadow" stroke-width={4.5} /> (ndMode !== EfisNdMode.ARC ? 'M384,134 L379,143 L384,152 L389,143 L384,134' : 'M384,128 L378,138 L384,148 L390,138 L384,128'))} class="rounded Green" stroke-width={3} />