Skip to content

Commit

Permalink
fix: AOC INIT/REVIEW page - ON and OFF time logic. (flybywiresim#8666)
Browse files Browse the repository at this point in the history
* fix: init bugfix for AOC INIT Page 2/2

* fix: improve check for aoctimes.on triggering right after takeoff

* cleanup: removed comments.

* fix: condition

* fix: small edit to condition

* fix: flightphase takeoff not needed in aocTimes.on condition (line 556)

* fix: BLK time should compute the difference between IN and OUT times, not import the estimate from simbrief.

* cleanup: remove old code
  • Loading branch information
rahulrathnakumar authored Jul 14, 2024
1 parent d3e6e98 commit 826df86
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -535,7 +535,6 @@ class A320_Neo_CDU_MainDisplay extends FMCMainDisplay {
this.sendUpdate();
}
}

checkAocTimes() {
if (!this.aocTimes.off) {
if (this.flightPhaseManager.phase === FmgcFlightPhases.TAKEOFF && !this.isOnGround()) {
Expand All @@ -554,7 +553,7 @@ class A320_Neo_CDU_MainDisplay extends FMCMainDisplay {
}

if (!this.aocTimes.on) {
if (this.aocTimes.off && !this.isOnGround()) {
if (this.aocTimes.off && this.isOnGround()) {
// On: remains blank until Landing time
this.aocTimes.on = Math.floor(SimVar.GetGlobalVarValue("ZULU TIME", "seconds"));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ class CDUAocInit {
if (mcdu.aocTimes.in) {
inTime = `${FMCMainDisplay.secondsTohhmm(mcdu.aocTimes.in)}[color]green`;
}
if (mcdu.simbrief["blockTime"]) {
blockTime = `${FMCMainDisplay.secondsTohhmm(mcdu.simbrief.blockTime)}[color]green`;
if (mcdu.aocTimes.in && mcdu.aocTimes.out) {
blockTime = `${FMCMainDisplay.secondsTohhmm(mcdu.aocTimes.in - mcdu.aocTimes.out)}[color]green`;
}

function updateView() {
Expand Down

0 comments on commit 826df86

Please sign in to comment.