Skip to content
This repository has been archived by the owner on May 16, 2024. It is now read-only.

Commit

Permalink
Fix calculation bugs in the FMS Flight Log Page (#318)
Browse files Browse the repository at this point in the history
  • Loading branch information
J-Hoskin authored Oct 18, 2020
1 parent 6cea349 commit a607cc0
Showing 1 changed file with 9 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -562,21 +562,20 @@ class CJ4_FMC extends FMCMainDisplay {
}
}

// Update landing time

if(takeOffTime && takeOffTime > 0){
if(onGround){
// Update landing time
if(onGround && (!landingTime || landingTime == 0)){
if(zuluTime){
SimVar.SetSimVarValue("L:LANDING_TIME", "seconds", zuluTime);
}
}
// Update enroute time
if(!landingTime || landingTime == 0){
const enrouteTime = zuluTime - takeOffTime;
SimVar.SetSimVarValue("L:ENROUTE_TIME", "seconds", enrouteTime);
}
}

// Update enroute time
if(takeOffTime && takeOffTime > 0){
const enrouteTime = zuluTime - takeOffTime;
SimVar.SetSimVarValue("L:ENROUTE_TIME", "seconds", enrouteTime);
}

}
}

Expand All @@ -588,4 +587,4 @@ CJ4_FMC.VSPEED_STATUS = {
};

registerInstrument("cj4-fmc", CJ4_FMC);
//# sourceMappingURL=CJ4_FMC.js.map
//# sourceMappingURL=CJ4_FMC.js.map

0 comments on commit a607cc0

Please sign in to comment.