From 826df86b97ad46cf47f5fe326405abea9266abe5 Mon Sep 17 00:00:00 2001 From: Rahul Rathnakumar <36414241+rahulrathnakumar@users.noreply.github.com> Date: Sun, 14 Jul 2024 01:40:06 -0700 Subject: [PATCH] fix: AOC INIT/REVIEW page - ON and OFF time logic. (#8666) * 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 --- .../FlyByWire_A320_Neo/CDU/A320_Neo_CDU_MainDisplay.js | 3 +-- .../FlyByWire_A320_Neo/CDU/ATSU/A320_Neo_CDU_AOC_Init.js | 4 ++-- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_MainDisplay.js b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_MainDisplay.js index beb0c108103..5e7cd72ca3e 100644 --- a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_MainDisplay.js +++ b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/A320_Neo_CDU_MainDisplay.js @@ -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()) { @@ -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")); } diff --git a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/ATSU/A320_Neo_CDU_AOC_Init.js b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/ATSU/A320_Neo_CDU_AOC_Init.js index 6f5ebdfab43..d665d068bc8 100644 --- a/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/ATSU/A320_Neo_CDU_AOC_Init.js +++ b/fbw-a32nx/src/base/flybywire-aircraft-a320-neo/html_ui/Pages/VCockpit/Instruments/Airliners/FlyByWire_A320_Neo/CDU/ATSU/A320_Neo_CDU_AOC_Init.js @@ -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() {