diff --git a/hsim-a321neo/src/wasm/systems/a320_systems/src/fuel/mod.rs b/hsim-a321neo/src/wasm/systems/a320_systems/src/fuel/mod.rs index 55f12c32..de679a32 100644 --- a/hsim-a321neo/src/wasm/systems/a320_systems/src/fuel/mod.rs +++ b/hsim-a321neo/src/wasm/systems/a320_systems/src/fuel/mod.rs @@ -52,7 +52,7 @@ impl A320Fuel { FuelInfo { fuel_tank_id: "FUEL TANK CENTER QUANTITY", position: (-20.53, 0., 1.), - total_capacity_gallons: 2117., + total_capacity_gallons: 3698., }, FuelInfo { fuel_tank_id: "FUEL TANK LEFT MAIN QUANTITY", diff --git a/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/FuelPage.tsx b/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/A320_LVFR/A320Fuel.tsx similarity index 78% rename from hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/FuelPage.tsx rename to hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/A320_LVFR/A320Fuel.tsx index e5d703dd..8b9cbb68 100644 --- a/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/FuelPage.tsx +++ b/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/A320_LVFR/A320Fuel.tsx @@ -1,19 +1,14 @@ +// Copyright (c) 2023-2024 FlyByWire Simulations +// SPDX-License-Identifier: GPL-3.0 + /* eslint-disable max-len */ -import React, { useState } from 'react'; -import { getAirframeType } from '../../../Efb'; //DO NOT REMOVE UNDER ANY CIRCUMSTANCES -import { Fuel } from './Constants' //DO NOT REMOVE UNDER ANY CIRCUMSTANCES +import { Units, usePersistentNumberProperty, usePersistentProperty, useSimVar } from '@flybywiresim/fbw-sdk'; +import { OverWingOutline, ProgressBar, SelectGroup, SelectItem, SimpleInput, TooltipWrapper, getAirframeType, t } from '@flybywiresim/flypad'; // BE CAREFUL import { round } from 'lodash'; -import { CloudArrowDown, PlayFill, StopCircleFill } from 'react-bootstrap-icons'; -import { useSimVar, Units, usePersistentNumberProperty, usePersistentProperty } from '@flybywiresim/fbw-sdk'; import Slider from 'rc-slider'; -import { t } from '../../../translation'; -import { TooltipWrapper } from '../../../UtilComponents/TooltipWrapper'; -import { isSimbriefDataLoaded } from '../../../Store/features/simBrief'; -import { useAppSelector } from '../../../Store/store'; -import { SelectGroup, SelectItem } from '../../../UtilComponents/Form/Select'; -import { ProgressBar } from '../../../UtilComponents/Progress/Progress'; -import { SimpleInput } from '../../../UtilComponents/Form/SimpleInput/SimpleInput'; -import { OverWingOutline } from '../../../Assets/OverWingOutline'; +import React, { useState } from 'react'; +import { CloudArrowDown, PlayFill, StopCircleFill } from 'react-bootstrap-icons'; +import { FuelCapacity } from './Constants'; //CUSTOM LOOKUP BY HORIZON SIMULATIONS interface TankReadoutProps { title: string; @@ -32,7 +27,7 @@ const TankReadoutWidget = ({ title, current, target, capacity, currentUnit, tank const getFuelBarPercent = (curr: number, max: number) => (Math.max(curr, 0) / max) * 100; return ( -
+

{title}

{`${convertedFuelValue}/${round(tankValue)} ${currentUnit}`}

@@ -50,19 +45,30 @@ const TankReadoutWidget = ({ title, current, target, capacity, currentUnit, tank ); }; -export const FuelPage = () => { +interface FuelProps { + simbriefDataLoaded: boolean, + simbriefPlanRamp: number, + simbriefUnits: string, + massUnitForDisplay: string, + convertUnit: number, + isOnGround: boolean, +} +export const A320Fuel: React.FC = ({ + simbriefDataLoaded, + simbriefPlanRamp, + simbriefUnits, + massUnitForDisplay, + convertUnit, + isOnGround, +}) => { const [airframe] = useState(getAirframeType()); - const TOTAL_FUEL_GALLONS = Fuel[(airframe !== null ? airframe : 'A320_214')].total; - const OUTER_CELL_GALLONS = Fuel[(airframe !== null ? airframe : 'A320_214')].outer_cell; - const INNER_CELL_GALLONS = Fuel[(airframe !== null ? airframe : 'A320_214')].inner_cell; - const CENTER_TANK_GALLONS = Fuel[(airframe !== null ? airframe : 'A320_214')].center; + const TOTAL_FUEL_GALLONS = FuelCapacity[(airframe !== null ? airframe : 'A320_214')].total; + const OUTER_CELL_GALLONS = FuelCapacity[(airframe !== null ? airframe : 'A320_214')].outer_cell; + const INNER_CELL_GALLONS = FuelCapacity[(airframe !== null ? airframe : 'A320_214')].inner_cell; + const CENTER_TANK_GALLONS = FuelCapacity[(airframe !== null ? airframe : 'A320_214')].center; const wingTotalRefuelTimeSeconds = 1020; const CenterTotalRefuelTimeSeconds = 180; - const { usingMetric } = Units; - const [currentUnit] = useState(usingMetric ? 'KG' : 'LB'); - const [convertUnit] = useState(usingMetric ? 1 : (1 / 0.4535934)); - const [galToKg] = useSimVar('FUEL WEIGHT PER GALLON', 'kilograms', 1_000); const outerCell = () => OUTER_CELL_GALLONS * galToKg * convertUnit; const outerCells = () => outerCell() * 2; @@ -70,10 +76,6 @@ export const FuelPage = () => { const innerCells = () => innerCell() * 2; const centerTank = () => CENTER_TANK_GALLONS * galToKg * convertUnit; const totalFuel = () => centerTank() + innerCells() + outerCells(); - const [busDC2] = useSimVar('L:A32NX_ELEC_DC_2_BUS_IS_POWERED', 'Bool', 1_000); - const [busDCHot1] = useSimVar('L:A32NX_ELEC_DC_HOT_1_BUS_IS_POWERED', 'Bool', 1_000); - const [simGroundSpeed] = useSimVar('GPS GROUND SPEED', 'knots', 1_000); - const [isOnGround] = useSimVar('SIM ON GROUND', 'Bool', 1_000); const [eng1Running] = useSimVar('ENG COMBUSTION:1', 'Bool', 1_000); const [eng2Running] = useSimVar('ENG COMBUSTION:2', 'Bool', 1_000); const [refuelRate, setRefuelRate] = usePersistentProperty('REFUEL_RATE_SETTING'); @@ -97,17 +99,13 @@ export const FuelPage = () => { const [gsxFuelHoseConnected] = useSimVar('L:FSDT_GSX_FUELHOSE_CONNECTED', 'Number'); const [gsxRefuelState] = useSimVar('L:FSDT_GSX_REFUELING_STATE', 'Number'); - const { units } = useAppSelector((state) => state.simbrief.data); - const { planRamp } = useAppSelector((state) => state.simbrief.data.fuels); - const simbriefDataLoaded = isSimbriefDataLoaded(); - const gsxRefuelActive = () => (gsxRefuelState === 4 || gsxRefuelState === 5); - const isAirplaneCnD = () => !(simGroundSpeed > 0.1 || eng1Running || eng2Running || !isOnGround || (!busDC2 && !busDCHot1)); + const canRefuel = () => !(eng1Running || eng2Running || !isOnGround); const airplaneCanRefuel = () => { if (refuelRate !== '2') { - if (!isAirplaneCnD()) { + if (!canRefuel()) { setRefuelRate('2'); } } @@ -118,7 +116,7 @@ export const FuelPage = () => { } // In-flight refueling with GSX Sync enabled - return !isAirplaneCnD() && refuelRate === '2'; + return !canRefuel() && refuelRate === '2'; } return true; }; @@ -270,18 +268,18 @@ export const FuelPage = () => { }; const handleFuelAutoFill = () => { - let fuelToLoad = -1; + let fuelToLoad: number; - if (usingMetric) { - if (units === 'kgs') { - fuelToLoad = roundUpNearest100(planRamp); + if (Units.usingMetric) { + if (simbriefUnits === 'kgs') { + fuelToLoad = roundUpNearest100(simbriefPlanRamp); } else { - fuelToLoad = roundUpNearest100(Units.poundToKilogram(planRamp)); + fuelToLoad = roundUpNearest100(Units.poundToKilogram(simbriefPlanRamp)); } - } else if (units === 'kgs') { - fuelToLoad = roundUpNearest100(Units.kilogramToPound(planRamp)); + } else if (simbriefUnits === 'kgs') { + fuelToLoad = roundUpNearest100(Units.kilogramToPound(simbriefPlanRamp)); } else { - fuelToLoad = roundUpNearest100(planRamp); + fuelToLoad = roundUpNearest100(simbriefPlanRamp); } updateDesiredFuel(fuelToLoad.toString()); @@ -290,7 +288,7 @@ export const FuelPage = () => { const roundUpNearest100 = (plannedFuel: number) => Math.ceil(plannedFuel / 100) * 100; return ( -
+
{ current={totalCurrent()} target={totalTarget} capacity={totalFuel()} - currentUnit={currentUnit} + currentUnit={massUnitForDisplay} tankValue={totalFuel()} convertedFuelValue={totalCurrent()} - className="border-theme-accent overflow-hidden rounded-2xl border-2" + className="overflow-hidden rounded-2xl border-2 border-theme-accent" inlinedTitle width={420} /> @@ -310,22 +308,22 @@ export const FuelPage = () => { current={centerCurrent} target={centerTarget} capacity={CENTER_TANK_GALLONS} - currentUnit={currentUnit} + currentUnit={massUnitForDisplay} tankValue={centerTank()} convertedFuelValue={convertFuelValueCenter(centerCurrent)} - className="border-theme-accent overflow-hidden rounded-2xl border-2" + className="overflow-hidden rounded-2xl border-2 border-theme-accent" inlinedTitle width={420} />
-
+
@@ -334,18 +332,18 @@ export const FuelPage = () => { current={LOutCurrent} target={LOutTarget} capacity={OUTER_CELL_GALLONS} - currentUnit={currentUnit} + currentUnit={massUnitForDisplay} tankValue={outerCell()} convertedFuelValue={convertFuelValueCenter(LOutCurrent)} />
-
+
@@ -354,7 +352,7 @@ export const FuelPage = () => { current={ROutCurrent} target={ROutTarget} capacity={OUTER_CELL_GALLONS} - currentUnit={currentUnit} + currentUnit={massUnitForDisplay} tankValue={outerCell()} convertedFuelValue={convertFuelValueCenter(ROutCurrent)} /> @@ -388,22 +386,22 @@ export const FuelPage = () => { /> {/* tl overlay */}
{/* tr overlay */}
{/* bl overlay */}
{/* br overlay */}
@@ -434,12 +432,12 @@ export const FuelPage = () => { value={inputValue} onChange={(x) => updateDesiredFuel(x)} /> -
{currentUnit}
+
{massUnitForDisplay}
{simbriefDataLoaded && (
@@ -463,21 +461,21 @@ export const FuelPage = () => { )}
-
+

{t('Ground.Fuel.RefuelTime')}

- setRefuelRate('2')}>{t('Settings.Instant')} + setRefuelRate('2')}>{t('Settings.Instant')} - +
- setRefuelRate('1')}>{t('Settings.Fast')} + setRefuelRate('1')}>{t('Settings.Fast')}
- +
- setRefuelRate('0')}>{t('Settings.Real')} + setRefuelRate('0')}>{t('Settings.Real')}
diff --git a/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/Constants.ts b/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/A320_LVFR/Constants.ts similarity index 96% rename from hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/Constants.ts rename to hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/A320_LVFR/Constants.ts index c24d6d4a..1f5911f4 100644 --- a/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/Constants.ts +++ b/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/A320_LVFR/Constants.ts @@ -1,4 +1,4 @@ -export const Fuel = Object.freeze({ +export const FuelCapacity = Object.freeze({ A318_115: { total: 6303, outer_cell: 228, inner_cell: 1816, center: 2215}, A318_ACJ: { total: 6303, outer_cell: 228, inner_cell: 1816, center: 2215}, A318_BAW: { total: 6303, outer_cell: 228, inner_cell: 1816, center: 2215}, @@ -16,4 +16,4 @@ export const Fuel = Object.freeze({ A321_271N: { total: 6205, outer_cell: 228, inner_cell: 1816, center: 2117}, A321_271NX: { total: 6205, outer_cell: 228, inner_cell: 1816, center: 2117}, A321_271N_LR: { total: 7786, outer_cell: 228, inner_cell: 1816, center: 3698}, -}); \ No newline at end of file +}); diff --git a/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/Fuel.tsx b/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/Fuel.tsx new file mode 100644 index 00000000..e30cb323 --- /dev/null +++ b/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/Fuel.tsx @@ -0,0 +1,32 @@ +// Copyright (c) 2023-2024 FlyByWire Simulations +// SPDX-License-Identifier: GPL-3.0 + +/* eslint-disable max-len */ +import { Units, useSimVar } from '@flybywiresim/fbw-sdk'; +import { isSimbriefDataLoaded } from '@flybywiresim/flypad'; +import React, { useState } from 'react'; +import { useAppSelector } from '../../../Store/store'; +import { A320Fuel } from './A320_LVFR/A320Fuel'; + +export const Fuel = () => { + const [isOnGround] = useSimVar('SIM ON GROUND', 'Bool', 8_059); + const simbriefUnits = useAppSelector((state) => state.simbrief.data.units); + const simbriefPlanRamp = useAppSelector((state) => state.simbrief.data.fuels.planRamp); + + const simbriefDataLoaded = isSimbriefDataLoaded(); + + const [massUnitForDisplay] = useState(Units.usingMetric ? 'KGS' : 'LBS'); + const [convertUnit] = useState(Units.usingMetric ? 1 : (1 / 0.4535934)); + + + return ( + + ); +}; diff --git a/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Payload/Payload.tsx b/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Payload/PayloadPage.tsx similarity index 92% rename from hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Payload/Payload.tsx rename to hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Payload/PayloadPage.tsx index e43e8f59..00db5b1d 100644 --- a/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Payload/Payload.tsx +++ b/hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Payload/PayloadPage.tsx @@ -3,9 +3,15 @@ // SPDX-License-Identifier: GPL-3.0 /* eslint-disable max-len */ -import React, { useState } from 'react'; import { Units, usePersistentProperty, useSimVar } from '@flybywiresim/fbw-sdk'; -import { getAirframeType } from '../../../Efb'; +import { getAirframeType, isSimbriefDataLoaded, useAppSelector } from '@flybywiresim/flypad'; +import React, { useState } from 'react'; +import { A21NLEAPPayload } from './A21N_251N/A21NPayload'; +import { A21NLEAPFLEXPayload } from './A21N_251NX/A21NPayload'; +import { A21NLEAPLRPayload } from './A21N_251N_LR/A21NPayload'; +import { A21NPWPayload } from './A21N_271N/A21NPayload'; +import { A21NPWFLEXPayload } from './A21N_271NX/A21NPayload'; +import { A21NPWLRPayload } from './A21N_271N_LR/A21NPayload'; import { A318Payload } from './A318_115/A318Payload'; import { ACJPayload } from './A318_ACJ/A318Payload'; import { BAWPayload } from './A318_BAW/A318Payload'; @@ -17,16 +23,8 @@ import { A320CFMPayload } from './A320_214/A320Payload'; import { A320CFMSLPayload } from './A320_214_SL/A320Payload'; import { A320IAEPayload } from './A320_232/A320Payload'; import { A320IAESLPayload } from './A320_232_SL/A320Payload'; -import { A21NLEAPPayload } from './A21N_251N/A21NPayload'; -import { A21NLEAPLRPayload } from './A21N_251N_LR/A21NPayload'; -import { A21NLEAPFLEXPayload } from './A21N_251NX/A21NPayload'; -import { A21NPWPayload } from './A21N_271N/A21NPayload'; -import { A21NPWLRPayload } from './A21N_271N_LR/A21NPayload'; -import { A21NPWFLEXPayload } from './A21N_271NX/A21NPayload'; -import { useAppSelector } from '../../../Store/store'; -import { isSimbriefDataLoaded } from '../../../Store/features/simBrief'; -export const Payload = () => { +export const PayloadPage = () => { const simbriefUnits = useAppSelector((state) => state.simbrief.data.units); const simbriefBagWeight = parseInt(useAppSelector((state) => state.simbrief.data.weights.bagWeight)); const simbriefPaxWeight = parseInt(useAppSelector((state) => state.simbrief.data.weights.passengerWeight)); @@ -37,7 +35,6 @@ export const Payload = () => { const [isOnGround] = useSimVar('SIM ON GROUND', 'Bool', 8_059); const [boardingStarted, setBoardingStarted] = useSimVar('L:A32NX_BOARDING_STARTED_BY_USR', 'Bool', 509); const [boardingRate, setBoardingRate] = usePersistentProperty('CONFIG_BOARDING_RATE', 'REAL'); - const payloadImported = useAppSelector((state) => state.simbrief.payloadImported); const simbriefDataLoaded = isSimbriefDataLoaded(); @@ -54,7 +51,6 @@ export const Payload = () => { simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} @@ -73,7 +69,6 @@ export const Payload = () => { simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} @@ -92,7 +87,6 @@ export const Payload = () => { simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} @@ -111,7 +105,6 @@ export const Payload = () => { simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} @@ -130,7 +123,6 @@ export const Payload = () => { simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} @@ -149,7 +141,6 @@ export const Payload = () => { simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} @@ -168,7 +159,6 @@ export const Payload = () => { simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} @@ -187,7 +177,6 @@ export const Payload = () => { simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} @@ -206,7 +195,6 @@ export const Payload = () => { simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} @@ -222,10 +210,9 @@ export const Payload = () => { simbriefBagWeight={simbriefBagWeight} simbriefPaxWeight={simbriefPaxWeight} simbriefPax={simbriefPax} - simbriefBag={simbriefBag} + simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} @@ -244,7 +231,6 @@ export const Payload = () => { simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} @@ -263,7 +249,6 @@ export const Payload = () => { simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} @@ -282,7 +267,6 @@ export const Payload = () => { simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} @@ -301,7 +285,6 @@ export const Payload = () => { simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} @@ -320,7 +303,6 @@ export const Payload = () => { simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} @@ -339,7 +321,6 @@ export const Payload = () => { simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} @@ -358,7 +339,6 @@ export const Payload = () => { simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} @@ -377,7 +357,6 @@ export const Payload = () => { simbriefBag={simbriefBag} simbriefFreight={simbriefFreight} simbriefDataLoaded={simbriefDataLoaded} - payloadImported={payloadImported} massUnitForDisplay={massUnitForDisplay} isOnGround={isOnGround} boardingStarted={boardingStarted} diff --git a/hsim-common/src/systems/shared/src/AircraftVersionChecker.ts b/hsim-common/src/systems/shared/src/AircraftVersionChecker.ts index f940113b..602e34d8 100644 --- a/hsim-common/src/systems/shared/src/AircraftVersionChecker.ts +++ b/hsim-common/src/systems/shared/src/AircraftVersionChecker.ts @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-3.0 /* eslint-disable no-console */ -import { CommitInfo, ReleaseInfo } from '@flybywiresim/api-client'; +import { CommitInfo, GitVersions, ReleaseInfo } from '@flybywiresim/api-client'; import { NotificationManager, PopUpDialog } from '@flybywiresim/fbw-sdk'; import Compare from 'semver/functions/compare'; @@ -149,9 +149,9 @@ export class AircraftVersionChecker { * @private */ private static async initialize(aircraft: string) { - // this.releaseInfo = await GitVersions.getReleases('flybywiresim', aircraft, false, 0, 1); - // this.newestCommit = await GitVersions.getNewestCommit('flybywiresim', aircraft, 'master'); - // this.newestExpCommit = await GitVersions.getNewestCommit('flybywiresim', aircraft, 'experimental'); + this.releaseInfo = await GitVersions.getReleases('Horizon-Simulations', aircraft, false, 0, 1); + this.newestCommit = await GitVersions.getNewestCommit('Horizon-Simulations', aircraft, 'main'); + this.newestExpCommit = await GitVersions.getNewestCommit('Horizon-Simulations', aircraft, 'experimental'); this.buildInfo = await AircraftVersionChecker.getBuildInfo(aircraft); }