-
-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a1d3d99
commit 55c6a66
Showing
6 changed files
with
112 additions
and
103 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
hsim-common/src/systems/instruments/src/EFB/Ground/Pages/Fuel/Fuel.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 ( | ||
<A320Fuel | ||
simbriefDataLoaded={simbriefDataLoaded} | ||
simbriefUnits={simbriefUnits} | ||
simbriefPlanRamp={simbriefPlanRamp} | ||
massUnitForDisplay={massUnitForDisplay} | ||
convertUnit={convertUnit} | ||
isOnGround={isOnGround} | ||
/> | ||
); | ||
}; |
Oops, something went wrong.