diff --git a/fbw-a380x/src/systems/instruments/src/OITlegacy/OitLegacy.tsx b/fbw-a380x/src/systems/instruments/src/OITlegacy/OitLegacy.tsx index 8d90fa598c1..f8eff1cf166 100644 --- a/fbw-a380x/src/systems/instruments/src/OITlegacy/OitLegacy.tsx +++ b/fbw-a380x/src/systems/instruments/src/OITlegacy/OitLegacy.tsx @@ -10,6 +10,9 @@ import { ModalProvider, PowerContext, PowerStates, + setAirframeInfo, + setCabinInfo, + setFlypadInfo, store, } from '@flybywiresim/flypad'; @@ -21,7 +24,8 @@ import { Provider } from 'react-redux'; import { TroubleshootingContextProvider } from '../../../../../../fbw-common/src/systems/instruments/src/EFB/TroubleshootingContext'; import { ErrorBoundary } from 'react-error-boundary'; import { MemoryRouter as Router } from 'react-router'; -import { useSimVar } from '@flybywiresim/fbw-sdk'; +import { UniversalConfigProvider, useSimVar } from '@flybywiresim/fbw-sdk'; +import { Dispatch } from '../../../../../../fbw-common/src/systems/instruments/src/EFB/Dispatch/Dispatch'; export const getDisplayIndex = () => { const url = Array.from(document.querySelectorAll('vcockpit-panel > *')) @@ -46,6 +50,20 @@ export const OitEfbWrapper: React.FC = ({ eventBus }) => { const [err, setErr] = useState(false); + useEffect(() => { + UniversalConfigProvider.fetchAirframeInfo(process.env.AIRCRAFT_PROJECT_PREFIX, process.env.AIRCRAFT_VARIANT).then( + (info) => store.dispatch(setAirframeInfo(info)), + ); + + UniversalConfigProvider.fetchFlypadInfo(process.env.AIRCRAFT_PROJECT_PREFIX, process.env.AIRCRAFT_VARIANT).then( + (info) => store.dispatch(setFlypadInfo(info)), + ); + + UniversalConfigProvider.fetchCabinInfo(process.env.AIRCRAFT_PROJECT_PREFIX, process.env.AIRCRAFT_VARIANT).then( + (info) => store.dispatch(setCabinInfo(info)), + ); + }, []); + useEffect(() => { document .getElementsByTagName('a380x-oitlegacy')[0] @@ -126,7 +144,10 @@ export const OitEfbWrapper: React.FC = ({ eventBus }) => { }} >
-
{showCharts === 1 && }
+
+ {showCharts === 1 && } + {showOfp === 1 && } +
)}