Skip to content

Commit

Permalink
fix: do not convert internal values (#7735)
Browse files Browse the repository at this point in the history
  • Loading branch information
Saschl committed Jan 31, 2023
1 parent 93d9983 commit fa3b5e6
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -82,10 +82,10 @@ export const StatusArea = () => {
const padMinutes = String(minutes).padStart(2, '0');
const padHours = String(hours).padStart(2, '0');

const getPayloadWeight = (unit: string, payloadCount: number) => {
const getPayloadWeight = (payloadCount: number) => {
let payloadWeight = 0;
for (let i = 1; i <= payloadCount; i++) {
payloadWeight += SimVar.GetSimVarValue(`PAYLOAD STATION WEIGHT:${i}`, unit);
payloadWeight += SimVar.GetSimVarValue(`PAYLOAD STATION WEIGHT:${i}`, 'kg');
}
return payloadWeight;
};
Expand All @@ -96,7 +96,7 @@ export const StatusArea = () => {
const payloadCount = SimVar.GetSimVarValue('PAYLOAD STATION COUNT', 'number');

const gwUnit = NXUnits.userWeightUnit();
const payloadWeight = getPayloadWeight(gwUnit, payloadCount);
const payloadWeight = getPayloadWeight(payloadCount);
const gw = Math.round(NXUnits.kgToUser(emptyWeight + fuelWeight + payloadWeight));

if (eng1Running || eng2Running && gw != null) {
Expand Down

0 comments on commit fa3b5e6

Please sign in to comment.