From 6ed748765d63c56cbcd4101f65266f8629ff961d Mon Sep 17 00:00:00 2001 From: Frank Kopp Date: Tue, 29 Oct 2024 15:18:13 +0100 Subject: [PATCH] fix: A380X temporarily deactivate the MSFS-PLN sync in the A380X (#9145) * Temporarily deactivate the MSFS-PLN sync in the A380X until feature is avail in the A380X. * Undo import barrel * Refactored hiding EFB option --- .../src/systems/instruments/src/EFB/index.tsx | 1 + .../src/systems/instruments/src/EFB/index.tsx | 1 + .../instruments/src/EFB/AircraftContext.ts | 4 ++- .../src/EFB/Settings/Pages/SimOptionsPage.tsx | 29 ++++++++++--------- 4 files changed, 21 insertions(+), 14 deletions(-) diff --git a/fbw-a32nx/src/systems/instruments/src/EFB/index.tsx b/fbw-a32nx/src/systems/instruments/src/EFB/index.tsx index d903e957ffd..bfc19394703 100644 --- a/fbw-a32nx/src/systems/instruments/src/EFB/index.tsx +++ b/fbw-a32nx/src/systems/instruments/src/EFB/index.tsx @@ -53,6 +53,7 @@ render( }, sim: { cones: true, + msfsFplnSync: true, pilotSeat: false, registrationDecal: true, wheelChocks: true, diff --git a/fbw-a380x/src/systems/instruments/src/EFB/index.tsx b/fbw-a380x/src/systems/instruments/src/EFB/index.tsx index edbf93d5168..1337a75e44a 100644 --- a/fbw-a380x/src/systems/instruments/src/EFB/index.tsx +++ b/fbw-a380x/src/systems/instruments/src/EFB/index.tsx @@ -50,6 +50,7 @@ render( }, sim: { cones: false, + msfsFplnSync: false, // FIXME: Enable when MSFS FPLN sync is available pilotSeat: true, registrationDecal: false, // TODO FIXME: Enable when dynamic registration decal is completed wheelChocks: false, diff --git a/fbw-common/src/systems/instruments/src/EFB/AircraftContext.ts b/fbw-common/src/systems/instruments/src/EFB/AircraftContext.ts index 80e58e1196d..f83fbf00c59 100644 --- a/fbw-common/src/systems/instruments/src/EFB/AircraftContext.ts +++ b/fbw-common/src/systems/instruments/src/EFB/AircraftContext.ts @@ -46,9 +46,10 @@ interface RealismOptions { interface SimOptions { cones: boolean; + msfsFplnSync: boolean; + pilotSeat: boolean; registrationDecal: boolean; wheelChocks: boolean; - pilotSeat: boolean; } interface ThrottleOptions { @@ -93,6 +94,7 @@ export const AircraftContext = createContext({ }, sim: { cones: false, + msfsFplnSync: false, pilotSeat: false, registrationDecal: false, wheelChocks: false, diff --git a/fbw-common/src/systems/instruments/src/EFB/Settings/Pages/SimOptionsPage.tsx b/fbw-common/src/systems/instruments/src/EFB/Settings/Pages/SimOptionsPage.tsx index d44116c89f5..16a98457686 100644 --- a/fbw-common/src/systems/instruments/src/EFB/Settings/Pages/SimOptionsPage.tsx +++ b/fbw-common/src/systems/instruments/src/EFB/Settings/Pages/SimOptionsPage.tsx @@ -1,6 +1,7 @@ // Copyright (c) 2023-2024 FlyByWire Simulations // SPDX-License-Identifier: GPL-3.0 +/* eslint-disable max-len */ /* eslint-disable max-len */ import React, { useContext, useState } from 'react'; import { @@ -75,19 +76,21 @@ export const SimOptionsPage = () => { - - - {fpSyncButtons.map((button) => ( - setFpSync(button.setting)} - selected={fpSync === button.setting} - > - {button.name} - - ))} - - + {aircraftContext.settingsPages.sim.msfsFplnSync && ( + + + {fpSyncButtons.map((button) => ( + setFpSync(button.setting)} + selected={fpSync === button.setting} + > + {button.name} + + ))} + + + )}