From b4af1c4671414145c6b22b0e275621c54179f1e5 Mon Sep 17 00:00:00 2001 From: Benjamin Dupont Date: Sun, 25 Dec 2022 21:55:14 -0500 Subject: [PATCH] remove separate SD page builds --- .../FlyByWire_A320_NEO/panel/panel.cfg | 2 +- src/instruments/buildSrc/igniter/tasks.mjs | 77 ++----------------- src/instruments/buildSrc/simulatorBuild.mjs | 3 +- src/instruments/buildSrc/templatePlugins.mjs | 19 ++--- src/instruments/ecam-page-template/rollup.js | 41 ---------- .../ecam-page-template/template.html | 21 ----- .../ecam-page-template/template.js | 48 ------------ src/instruments/src/SD/Pages/Apu/Apu.tsx | 3 - src/instruments/src/SD/Pages/Apu/config.json | 4 - src/instruments/src/SD/Pages/Bleed/Bleed.tsx | 3 - .../src/SD/Pages/Bleed/config.json | 4 - src/instruments/src/SD/Pages/Cond/Cond.tsx | 4 - src/instruments/src/SD/Pages/Cond/config.json | 4 - src/instruments/src/SD/Pages/Crz/Crz.tsx | 4 - src/instruments/src/SD/Pages/Crz/config.json | 4 - src/instruments/src/SD/Pages/Door/Door.tsx | 4 - src/instruments/src/SD/Pages/Door/config.json | 4 - src/instruments/src/SD/Pages/Elec/Elec.tsx | 4 - src/instruments/src/SD/Pages/Elec/config.json | 4 - src/instruments/src/SD/Pages/Eng/Eng.tsx | 5 -- src/instruments/src/SD/Pages/Eng/config.json | 4 - src/instruments/src/SD/Pages/Fctl/Fctl.tsx | 7 +- src/instruments/src/SD/Pages/Fctl/config.json | 4 - src/instruments/src/SD/Pages/Fuel/Fuel.tsx | 3 - src/instruments/src/SD/Pages/Fuel/config.json | 4 - src/instruments/src/SD/Pages/Hyd/Hyd.tsx | 6 -- src/instruments/src/SD/Pages/Hyd/config.json | 4 - src/instruments/src/SD/Pages/Press/Press.tsx | 3 - .../src/SD/Pages/Press/config.json | 4 - .../src/SD/Pages/Status/Status.tsx | 2 - .../src/SD/Pages/Status/config.json | 4 - src/instruments/src/SD/Pages/Wheel/Wheel.tsx | 3 - .../src/SD/Pages/Wheel/config.json | 4 - .../src/SD/StatusArea/StatusArea.tsx | 2 - src/instruments/src/SD/index.tsx | 2 +- 35 files changed, 16 insertions(+), 302 deletions(-) delete mode 100644 src/instruments/ecam-page-template/rollup.js delete mode 100644 src/instruments/ecam-page-template/template.html delete mode 100644 src/instruments/ecam-page-template/template.js delete mode 100644 src/instruments/src/SD/Pages/Apu/config.json delete mode 100644 src/instruments/src/SD/Pages/Bleed/config.json delete mode 100644 src/instruments/src/SD/Pages/Cond/config.json delete mode 100644 src/instruments/src/SD/Pages/Crz/config.json delete mode 100644 src/instruments/src/SD/Pages/Door/config.json delete mode 100644 src/instruments/src/SD/Pages/Elec/config.json delete mode 100644 src/instruments/src/SD/Pages/Eng/config.json delete mode 100644 src/instruments/src/SD/Pages/Fctl/config.json delete mode 100644 src/instruments/src/SD/Pages/Fuel/config.json delete mode 100644 src/instruments/src/SD/Pages/Hyd/config.json delete mode 100644 src/instruments/src/SD/Pages/Press/config.json delete mode 100644 src/instruments/src/SD/Pages/Status/config.json delete mode 100644 src/instruments/src/SD/Pages/Wheel/config.json diff --git a/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/panel/panel.cfg b/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/panel/panel.cfg index d3dae430c31..cb3b57230b2 100644 --- a/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/panel/panel.cfg +++ b/flybywire-aircraft-a320-neo/SimObjects/AirPlanes/FlyByWire_A320_NEO/panel/panel.cfg @@ -39,7 +39,7 @@ size_mm = 768,768 #TODO FIXME - Should be 768,768 pixel_size = 768,768 #TODO FIXME - Should be 768,768 texture = $EICAS2 -htmlgauge00 = A32NX/SD/template.html, 0,0,768,768 #TODO FIXME - Should be 768,768 +htmlgauge00 = A32NX/SD/template.html, 0,0,768,768 [VCockpit05] size_mm = 512,512 diff --git a/src/instruments/buildSrc/igniter/tasks.mjs b/src/instruments/buildSrc/igniter/tasks.mjs index 301cc87a856..2a688045160 100644 --- a/src/instruments/buildSrc/igniter/tasks.mjs +++ b/src/instruments/buildSrc/igniter/tasks.mjs @@ -3,85 +3,20 @@ import { join } from 'path'; import { ExecTask } from '@flybywiresim/igniter'; import { Directories } from '../directories.mjs'; -const ecamPages = [ - { - name: 'eng-page', - path: 'SD/Pages/Eng', - }, - { - name: 'door-page', - path: 'SD/Pages/Door', - }, - { - name: 'cond-page', - path: 'SD/Pages/Cond', - }, - { - name: 'fctl-page', - path: 'SD/Pages/Fctl', - }, - { - name: 'elec-page', - path: 'SD/Pages/Elec', - }, - { - name: 'hyd-page', - path: 'SD/Pages/Hyd', - }, - { - name: 'wheel-page', - path: 'SD/Pages/Wheel', - }, - { - name: 'crz-page', - path: 'SD/Pages/Crz', - }, - { - name: 'fuel-page', - path: 'SD/Pages/Fuel', - }, - { - name: 'apu-page', - path: 'SD/Pages/Apu', - }, - { - name: 'press-page', - path: 'SD/Pages/Press', - }, - { - name: 'bleed-page', - path: 'SD/Pages/Bleed', - }, - { - name: 'status-page', - path: 'SD/Pages/Status', - }, -]; - export function getInputs() { const baseInstruments = fs.readdirSync(join(Directories.instruments, 'src'), { withFileTypes: true }) .filter((d) => d.isDirectory() && fs.existsSync(join(Directories.instruments, 'src', d.name, 'config.json'))); - return [ - ...baseInstruments.map(({ name }) => ({ path: name, name, isInstrument: true })), - ...ecamPages.map((def) => ({ ...def, isInstrument: false })), - ]; + return baseInstruments.map(({ name }) => ({ path: name, name })); } export function getInstrumentsIgniterTasks() { const baseInstruments = fs.readdirSync(join(Directories.instruments, 'src'), { withFileTypes: true }) .filter((d) => d.isDirectory() && fs.existsSync(join(Directories.instruments, 'src', d.name, 'config.json'))); - return [ - ...baseInstruments.map(({ name }) => new ExecTask( - name, - `node src/instruments/buildSrc/igniter/worker.mjs ${name}`, - [join('src/instruments/src', name), join('flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/A32NX', name)], - )), - ...ecamPages.map(({ name, path }) => new ExecTask( - name, - `node src/instruments/buildSrc/igniter/worker.mjs ${name}`, - [join('src/instruments/src', path), join('flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/A32NX/EcamPages', name)], - )), - ]; + return baseInstruments.map(({ name }) => new ExecTask( + name, + `node src/instruments/buildSrc/igniter/worker.mjs ${name}`, + [join('src/instruments/src', name), join('flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/A32NX', name)], + )); } diff --git a/src/instruments/buildSrc/simulatorBuild.mjs b/src/instruments/buildSrc/simulatorBuild.mjs index 0c88292bdb1..da1b6f82fdb 100644 --- a/src/instruments/buildSrc/simulatorBuild.mjs +++ b/src/instruments/buildSrc/simulatorBuild.mjs @@ -8,7 +8,7 @@ import { getInputs } from './igniter/tasks.mjs'; process.chdir(Directories.src); export default getInputs() - .map(({ path, name, isInstrument }) => { + .map(({ path, name }) => { const config = JSON.parse(fs.readFileSync(join(Directories.instruments, 'src', path, 'config.json'))); const additionalImports = config.additionalImports ? config.additionalImports : []; @@ -36,7 +36,6 @@ export default getInputs() ...additionalImports, ], config, - isInstrument, }), ], }; diff --git a/src/instruments/buildSrc/templatePlugins.mjs b/src/instruments/buildSrc/templatePlugins.mjs index 0ad21914b1e..5d450d360e1 100644 --- a/src/instruments/buildSrc/templatePlugins.mjs +++ b/src/instruments/buildSrc/templatePlugins.mjs @@ -1,20 +1,13 @@ import { join } from 'path'; import instrumentTemplate from '@flybywiresim/rollup-plugin-msfs'; -import ecamPageTemplate from '../ecam-page-template/rollup.js'; import { Directories } from './directories.mjs'; -export function getTemplatePlugin({ name, config, imports = [], isInstrument }) { - if (isInstrument) { - return instrumentTemplate({ - name, - elementName: `a32nx-${name.toLowerCase()}`, - config, - imports, - outputDir: join(Directories.root, 'flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/A32NX'), - }); - } - return ecamPageTemplate({ +export function getTemplatePlugin({ name, config, imports = []}) { + return instrumentTemplate({ name, - outputDir: join(Directories.root, 'flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/A32NX/EcamPages'), + elementName: `a32nx-${name.toLowerCase()}`, + config, + imports, + outputDir: join(Directories.root, 'flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/A32NX'), }); } diff --git a/src/instruments/ecam-page-template/rollup.js b/src/instruments/ecam-page-template/rollup.js deleted file mode 100644 index b0b601cf990..00000000000 --- a/src/instruments/ecam-page-template/rollup.js +++ /dev/null @@ -1,41 +0,0 @@ -'use strict'; - -const path = require('path'); -const fs = require('fs'); - -// The bundle code contains `$`, which is a special character -// in JS replace and replaceAll, so we can't use those. -function replaceButSad(s, search, replace) { - return s.split(search).join(replace); -} - -const TEMPLATE_HTML = fs.readFileSync(path.join(__dirname, 'template.html'), 'utf8'); -const TEMPLATE_JS = fs.readFileSync(path.join(__dirname, 'template.js'), 'utf8'); - -module.exports = ({ name, outputDir }) => ({ - name: 'template', - writeBundle(_config, bundle) { - const { code: jsCode } = bundle['bundle.js']; - const { source: cssCode } = bundle['bundle.css']; - - const snakeCaseName = name.replace('-', '_'); - - const process = (s) => { - let tmp = s; - tmp = replaceButSad(tmp, 'PAGE_NAME_LOWER_SKEWER', name); - tmp = replaceButSad(tmp, 'PAGE_NAME_SKEWER', name); - tmp = replaceButSad(tmp, 'PAGE_NAME_LOWER', snakeCaseName.toLowerCase()); - tmp = replaceButSad(tmp, 'PAGE_NAME', snakeCaseName); - tmp = replaceButSad(tmp, 'PAGE_BUNDLE', jsCode); - tmp = replaceButSad(tmp, 'PAGE_STYLE', cssCode); - return tmp; - }; - - const templateHtml = process(TEMPLATE_HTML); - const templateJs = process(TEMPLATE_JS); - - fs.mkdirSync(path.join(outputDir, name), { recursive: true }); - fs.writeFileSync(path.join(outputDir, name, 'template.html'), templateHtml); - fs.writeFileSync(path.join(outputDir, name, 'template.js'), templateJs); - }, -}); diff --git a/src/instruments/ecam-page-template/template.html b/src/instruments/ecam-page-template/template.html deleted file mode 100644 index 3b70fbd3877..00000000000 --- a/src/instruments/ecam-page-template/template.html +++ /dev/null @@ -1,21 +0,0 @@ - - - - - diff --git a/src/instruments/ecam-page-template/template.js b/src/instruments/ecam-page-template/template.js deleted file mode 100644 index 46b381f5c38..00000000000 --- a/src/instruments/ecam-page-template/template.js +++ /dev/null @@ -1,48 +0,0 @@ -'use strict'; - -/* global Airliners */ - -class A32NX_PAGE_NAME_Logic extends Airliners.EICASTemplateElement { - constructor() { - super(); - let lastTime = this._lastTime; - this.getDeltaTime = () => { - const nowTime = Date.now(); - const deltaTime = nowTime - lastTime; - lastTime = nowTime; - - return deltaTime; - }; - } - - get templateID() { - return 'A32NX_PAGE_NAME_TEMPLATE'; - } - - connectedCallback() { - super.connectedCallback(); - - // This is big hack, see `template.html`. - { - const code = document.getElementById('A32NX_PAGE_NAME_BUNDLED_STYLE').innerHTML; - const style = document.createElement('style'); - style.innerHTML = code; - document.head.appendChild(style); - } - { - const code = document.getElementById('A32NX_PAGE_NAME_BUNDLED_LOGIC').innerHTML; - const script = document.createElement('script'); - script.innerHTML = code; - document.body.appendChild(script); - } - } - - onEvent(_event) { - } - - update(_deltaTime) { - this.dispatchEvent(new CustomEvent('update', { detail: this.getDeltaTime() })); - } -} - -customElements.define('a32nx-PAGE_NAME_LOWER_SKEWER-element', A32NX_PAGE_NAME_Logic); diff --git a/src/instruments/src/SD/Pages/Apu/Apu.tsx b/src/instruments/src/SD/Pages/Apu/Apu.tsx index 538456066b7..b6f1111e455 100644 --- a/src/instruments/src/SD/Pages/Apu/Apu.tsx +++ b/src/instruments/src/SD/Pages/Apu/Apu.tsx @@ -1,6 +1,5 @@ import React, { useEffect, useState } from 'react'; import { useArinc429Var } from '@instruments/common/arinc429'; -import { render } from '@instruments/common/index'; import { useSimVar } from '@instruments/common/simVars'; import { GaugeComponent, GaugeMarkerComponent } from '@instruments/common/gauges'; import { PageTitle } from '../../Common/PageTitle'; @@ -496,5 +495,3 @@ const ApuMemos = ({ x, y } : ComponentPositionProps) => { ); }; - -render(); diff --git a/src/instruments/src/SD/Pages/Apu/config.json b/src/instruments/src/SD/Pages/Apu/config.json deleted file mode 100644 index 3ea0390ce9c..00000000000 --- a/src/instruments/src/SD/Pages/Apu/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "index": "./Apu.tsx", - "isInteractive": false -} diff --git a/src/instruments/src/SD/Pages/Bleed/Bleed.tsx b/src/instruments/src/SD/Pages/Bleed/Bleed.tsx index 7b82972d068..5eabcfbcdbc 100644 --- a/src/instruments/src/SD/Pages/Bleed/Bleed.tsx +++ b/src/instruments/src/SD/Pages/Bleed/Bleed.tsx @@ -1,5 +1,4 @@ import React, { FC } from 'react'; -import { render } from '@instruments/common/index'; import { useSimVar } from '@instruments/common/simVars'; import { PageTitle } from '../../Common/PageTitle'; import { EcamPage } from '../../Common/EcamPage'; @@ -99,5 +98,3 @@ export const BleedPage: FC = () => { ); }; - -render(); diff --git a/src/instruments/src/SD/Pages/Bleed/config.json b/src/instruments/src/SD/Pages/Bleed/config.json deleted file mode 100644 index 279acb91304..00000000000 --- a/src/instruments/src/SD/Pages/Bleed/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "index": "./Bleed.tsx", - "isInteractive": false -} diff --git a/src/instruments/src/SD/Pages/Cond/Cond.tsx b/src/instruments/src/SD/Pages/Cond/Cond.tsx index d31c41d7fc3..5f8fbe2c900 100644 --- a/src/instruments/src/SD/Pages/Cond/Cond.tsx +++ b/src/instruments/src/SD/Pages/Cond/Cond.tsx @@ -6,8 +6,6 @@ import Valve from './Valve'; import '../../Common/CommonStyles.scss'; -// setIsEcamPage('cond_page'); - export const CondPage = () => { // Disaply trim valve position for each zone const gaugeOffset = -43; // Gauges range is from -43 degree to +43 degree @@ -104,5 +102,3 @@ const CondUnit = ({ title, selectedTemp, cabinTemp, trimTemp, x, y, offset, hotA ); }; - -render(); diff --git a/src/instruments/src/SD/Pages/Cond/config.json b/src/instruments/src/SD/Pages/Cond/config.json deleted file mode 100644 index befff9b98ad..00000000000 --- a/src/instruments/src/SD/Pages/Cond/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "index": "./Cond.tsx", - "isInteractive": false -} diff --git a/src/instruments/src/SD/Pages/Crz/Crz.tsx b/src/instruments/src/SD/Pages/Crz/Crz.tsx index 0921d98ec6a..124d4bc382e 100644 --- a/src/instruments/src/SD/Pages/Crz/Crz.tsx +++ b/src/instruments/src/SD/Pages/Crz/Crz.tsx @@ -7,8 +7,6 @@ import { fuelForDisplay } from '../../Common/FuelFunctions'; import './Crz.scss'; -// setIsEcamPage('crz_page'); - export const CrzPage = () => ( <> @@ -231,5 +229,3 @@ export const CondComponent = () => { ); }; - -render(); diff --git a/src/instruments/src/SD/Pages/Crz/config.json b/src/instruments/src/SD/Pages/Crz/config.json deleted file mode 100644 index 560f590c6a6..00000000000 --- a/src/instruments/src/SD/Pages/Crz/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "index": "./Crz.tsx", - "isInteractive": false -} diff --git a/src/instruments/src/SD/Pages/Door/Door.tsx b/src/instruments/src/SD/Pages/Door/Door.tsx index ed2cafdc538..86786898434 100644 --- a/src/instruments/src/SD/Pages/Door/Door.tsx +++ b/src/instruments/src/SD/Pages/Door/Door.tsx @@ -3,8 +3,6 @@ import React from 'react'; import { render } from '@instruments/common/index'; import { useSimVar } from '../../../Common/simVars'; -// setIsEcamPage('door_page'); - export const DoorPage = () => { const [cabin] = useSimVar('INTERACTIVE POINT OPEN:0', 'percent', 1000); const [catering] = useSimVar('INTERACTIVE POINT OPEN:3', 'percent', 1000); @@ -86,5 +84,3 @@ export const DoorPage = () => { ); }; - -render(); diff --git a/src/instruments/src/SD/Pages/Door/config.json b/src/instruments/src/SD/Pages/Door/config.json deleted file mode 100644 index e3e5e64860a..00000000000 --- a/src/instruments/src/SD/Pages/Door/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "index": "./Door.tsx", - "isInteractive": false -} diff --git a/src/instruments/src/SD/Pages/Elec/Elec.tsx b/src/instruments/src/SD/Pages/Elec/Elec.tsx index 34a9fefab09..7457ff8493a 100644 --- a/src/instruments/src/SD/Pages/Elec/Elec.tsx +++ b/src/instruments/src/SD/Pages/Elec/Elec.tsx @@ -7,8 +7,6 @@ import { useSimVar } from '../../../Common/simVars'; import { EcamPage } from '../../Common/EcamPage'; import { SvgGroup } from '../../Common/SvgGroup'; -// setIsEcamPage('elec_page'); - const maxStaleness = 300; export const ElecPage = () => { @@ -515,5 +513,3 @@ const Wire = ({ d, amber }: WireProps) => { const classes = classNames({ Green: !amber }, { Amber: amber }); return ; }; - -render(); diff --git a/src/instruments/src/SD/Pages/Elec/config.json b/src/instruments/src/SD/Pages/Elec/config.json deleted file mode 100644 index 8b188b36870..00000000000 --- a/src/instruments/src/SD/Pages/Elec/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "index": "./Elec.tsx", - "isInteractive": false -} diff --git a/src/instruments/src/SD/Pages/Eng/Eng.tsx b/src/instruments/src/SD/Pages/Eng/Eng.tsx index d0801902346..a546f1e2e33 100644 --- a/src/instruments/src/SD/Pages/Eng/Eng.tsx +++ b/src/instruments/src/SD/Pages/Eng/Eng.tsx @@ -1,6 +1,5 @@ import React, { FC, useState, useEffect } from 'react'; import { render } from '@instruments/common/index'; -import { setIsEcamPage } from '@instruments/common/defaults'; import { Arc, Needle } from '@instruments/common/gauges'; import { usePersistentProperty } from '@instruments/common/persistence'; import { useSimVar } from '@instruments/common/simVars'; @@ -10,8 +9,6 @@ import { SvgGroup } from '../../Common/SvgGroup'; import './Eng.scss'; -/* setIsEcamPage('eng_page'); */ - export const EngPage: FC = () => { const [weightUnit] = usePersistentProperty('CONFIG_USING_METRIC_UNIT', '1'); const [engSelectorPosition] = useSimVar('L:XMLVAR_ENG_MODE_SEL', 'Enum', 1000); @@ -351,5 +348,3 @@ const EngineColumn = ({ x, y, engineNumber }: ComponentPositionProps) => { ); }; - -render(); diff --git a/src/instruments/src/SD/Pages/Eng/config.json b/src/instruments/src/SD/Pages/Eng/config.json deleted file mode 100644 index 020be6050c2..00000000000 --- a/src/instruments/src/SD/Pages/Eng/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "index": "./Eng.tsx", - "isInteractive": false -} diff --git a/src/instruments/src/SD/Pages/Fctl/Fctl.tsx b/src/instruments/src/SD/Pages/Fctl/Fctl.tsx index c56a2f480c2..f2cca546e96 100644 --- a/src/instruments/src/SD/Pages/Fctl/Fctl.tsx +++ b/src/instruments/src/SD/Pages/Fctl/Fctl.tsx @@ -1,8 +1,6 @@ import React from 'react'; -import { render } from '@instruments/common/index'; import { useArinc429Var } from '@instruments/common/arinc429'; import { Arinc429Word } from '@shared/arinc429'; -import { setIsEcamPage } from '../../../Common/defaults'; import { useSimVar } from '../../../Common/simVars'; import { SvgGroup } from '../../Common/SvgGroup'; import { HydraulicsProvider, useHydraulics } from '../../Common/HydraulicsProvider'; @@ -14,8 +12,6 @@ import { Spoilers } from '../../Common/Spoilers'; import '../../Common/CommonStyles.scss'; -setIsEcamPage('fctl_page'); - interface HydraulicSystemPairProps { leftHydraulicSystem: HydraulicSystem, rightHydraulicSystem: HydraulicSystem, @@ -432,10 +428,9 @@ const ElevatorAxis = ({ x, y, side }: ComponentPositionProps & ComponentSidePosi interface ServoControlIndicatorProps extends ComponentPositionProps { servoFailed: boolean, } + const ServoControlIndicator = ({ x, y, servoFailed }: ServoControlIndicatorProps) => ( ); - -render(); diff --git a/src/instruments/src/SD/Pages/Fctl/config.json b/src/instruments/src/SD/Pages/Fctl/config.json deleted file mode 100644 index 2aaf052180d..00000000000 --- a/src/instruments/src/SD/Pages/Fctl/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "index": "./Fctl.tsx", - "isInteractive": false -} diff --git a/src/instruments/src/SD/Pages/Fuel/Fuel.tsx b/src/instruments/src/SD/Pages/Fuel/Fuel.tsx index bfcd1d9af28..835875eaa96 100644 --- a/src/instruments/src/SD/Pages/Fuel/Fuel.tsx +++ b/src/instruments/src/SD/Pages/Fuel/Fuel.tsx @@ -1,5 +1,4 @@ import React, { useEffect, useState } from 'react'; -import { render } from '@instruments/common/index'; import { useSimVar } from '@instruments/common/simVars'; import { useArinc429Var } from '@instruments/common/arinc429'; import { usePersistentProperty } from '../../../Common/persistence'; @@ -355,5 +354,3 @@ const Pump = ({ x, y, onBus = 'DC_ESS', pumpNumber, centreTank, tankQuantity }: ); }; - -render(); diff --git a/src/instruments/src/SD/Pages/Fuel/config.json b/src/instruments/src/SD/Pages/Fuel/config.json deleted file mode 100644 index 140e76bdea6..00000000000 --- a/src/instruments/src/SD/Pages/Fuel/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "index": "./Fuel.tsx", - "isInteractive": false -} diff --git a/src/instruments/src/SD/Pages/Hyd/Hyd.tsx b/src/instruments/src/SD/Pages/Hyd/Hyd.tsx index dd6841219ac..92cff941fb2 100644 --- a/src/instruments/src/SD/Pages/Hyd/Hyd.tsx +++ b/src/instruments/src/SD/Pages/Hyd/Hyd.tsx @@ -1,14 +1,10 @@ import React, { useEffect, useState } from 'react'; -import { render } from '@instruments/common/index'; import { useSimVar } from '@instruments/common/simVars'; -import { setIsEcamPage } from '@instruments/common/defaults'; import { SvgGroup } from '../../Common/SvgGroup'; import { Triangle } from '../../Common/Shapes'; import '../../Common/CommonStyles.scss'; -/* setIsEcamPage('hyd_page'); */ - const litersPerGallon = 3.79; enum HydSystem { @@ -452,5 +448,3 @@ const PTU = ({ x, y, yellowPressure, greenPressure, yellowPumpLowPressure, green ); }; - -render(); diff --git a/src/instruments/src/SD/Pages/Hyd/config.json b/src/instruments/src/SD/Pages/Hyd/config.json deleted file mode 100644 index d8479691e3f..00000000000 --- a/src/instruments/src/SD/Pages/Hyd/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "index": "./Hyd.tsx", - "isInteractive": false -} diff --git a/src/instruments/src/SD/Pages/Press/Press.tsx b/src/instruments/src/SD/Pages/Press/Press.tsx index 52d11f982f1..cf1370e91ea 100644 --- a/src/instruments/src/SD/Pages/Press/Press.tsx +++ b/src/instruments/src/SD/Pages/Press/Press.tsx @@ -1,5 +1,4 @@ import React, { FC, useState, useEffect, memo } from 'react'; -import { render } from '@instruments/common/index'; import { GaugeComponent, GaugeMarkerComponent, splitDecimals } from '@instruments/common/gauges'; import { Triangle } from '../../Common/Shapes'; import { PageTitle } from '../../Common/PageTitle'; @@ -558,5 +557,3 @@ const OverboardOutletComponent: FC = ({ validSDAC, ); }; - -render(); diff --git a/src/instruments/src/SD/Pages/Press/config.json b/src/instruments/src/SD/Pages/Press/config.json deleted file mode 100644 index 8b34840c485..00000000000 --- a/src/instruments/src/SD/Pages/Press/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "index": "./Press.tsx", - "isInteractive": false -} diff --git a/src/instruments/src/SD/Pages/Status/Status.tsx b/src/instruments/src/SD/Pages/Status/Status.tsx index f73fc3e1a00..2bb8b69bd64 100644 --- a/src/instruments/src/SD/Pages/Status/Status.tsx +++ b/src/instruments/src/SD/Pages/Status/Status.tsx @@ -19,5 +19,3 @@ export const StatusPage: FC = () => ( ); - -render(); diff --git a/src/instruments/src/SD/Pages/Status/config.json b/src/instruments/src/SD/Pages/Status/config.json deleted file mode 100644 index 6129deb79fe..00000000000 --- a/src/instruments/src/SD/Pages/Status/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "index": "./Status.tsx", - "isInteractive": false -} diff --git a/src/instruments/src/SD/Pages/Wheel/Wheel.tsx b/src/instruments/src/SD/Pages/Wheel/Wheel.tsx index 59f58f8086d..8e410a0fcea 100644 --- a/src/instruments/src/SD/Pages/Wheel/Wheel.tsx +++ b/src/instruments/src/SD/Pages/Wheel/Wheel.tsx @@ -1,5 +1,4 @@ import React from 'react'; -import { render } from '@instruments/common/index'; import { useSimVar } from '@instruments/common/simVars'; import { useArinc429Var } from '@instruments/common/arinc429'; import { Arinc429Word } from '@shared/arinc429'; @@ -495,5 +494,3 @@ const Wheels = ({ x, y, left, right }: WheelsProps) => { ); }; - -render(); diff --git a/src/instruments/src/SD/Pages/Wheel/config.json b/src/instruments/src/SD/Pages/Wheel/config.json deleted file mode 100644 index bd64d7ef8e9..00000000000 --- a/src/instruments/src/SD/Pages/Wheel/config.json +++ /dev/null @@ -1,4 +0,0 @@ -{ - "index": "./Wheel.tsx", - "isInteractive": false -} diff --git a/src/instruments/src/SD/StatusArea/StatusArea.tsx b/src/instruments/src/SD/StatusArea/StatusArea.tsx index 32568ea7e47..03cdf619efa 100644 --- a/src/instruments/src/SD/StatusArea/StatusArea.tsx +++ b/src/instruments/src/SD/StatusArea/StatusArea.tsx @@ -145,7 +145,6 @@ export const StatusArea = () => {
- @@ -241,7 +240,6 @@ export const StatusArea = () => { {loadFactorText} )} -
diff --git a/src/instruments/src/SD/index.tsx b/src/instruments/src/SD/index.tsx index f40dbca1ba7..d03d224f501 100644 --- a/src/instruments/src/SD/index.tsx +++ b/src/instruments/src/SD/index.tsx @@ -24,8 +24,8 @@ const Idle = () => {
- +
);