From 19c384d7d86b6df068889109f08dba31b3379a23 Mon Sep 17 00:00:00 2001 From: Ninjo Date: Sat, 26 Sep 2020 22:55:48 +0200 Subject: [PATCH] Added IRS TIME TO ALIGN indication on ND Implements #25 --- .../Airliners/B747_8/MFD/B747_8_MFD.html | 14 ++++++++++++++ .../Instruments/Airliners/B747_8/MFD/B747_8_MFD.js | 12 ++++++++++++ 2 files changed, 26 insertions(+) diff --git a/html_ui/Pages/VCockpit/Instruments/Airliners/B747_8/MFD/B747_8_MFD.html b/html_ui/Pages/VCockpit/Instruments/Airliners/B747_8/MFD/B747_8_MFD.html index 6e6a09a0d..4cd692a95 100644 --- a/html_ui/Pages/VCockpit/Instruments/Airliners/B747_8/MFD/B747_8_MFD.html +++ b/html_ui/Pages/VCockpit/Instruments/Airliners/B747_8/MFD/B747_8_MFD.html @@ -92,6 +92,20 @@ +
+ + TIME TO ALIGN + L + C + R + 0 + 0 + 0 + MIN + MIN + MIN + +
diff --git a/html_ui/Pages/VCockpit/Instruments/Airliners/B747_8/MFD/B747_8_MFD.js b/html_ui/Pages/VCockpit/Instruments/Airliners/B747_8/MFD/B747_8_MFD.js index 19bac028f..c60ecfe5d 100644 --- a/html_ui/Pages/VCockpit/Instruments/Airliners/B747_8/MFD/B747_8_MFD.js +++ b/html_ui/Pages/VCockpit/Instruments/Airliners/B747_8/MFD/B747_8_MFD.js @@ -84,6 +84,10 @@ class B747_8_MFD_MainPage extends NavSystemPage { this.trkBox = document.querySelector("#trk-box"); this.mapBox = document.querySelector("#map-box"); this.mapInstrument = document.querySelector("map-instrument"); + this.irsTimes = document.querySelector("#irs-times"); + this.leftIRSValue = document.querySelector("#l-irs-value"); + this.centerIRSValue = document.querySelector("#c-irs-value"); + this.rightIRSValue = document.querySelector("#r-irs-value"); } onUpdate(_deltaTime) { super.onUpdate(_deltaTime); @@ -91,19 +95,27 @@ class B747_8_MFD_MainPage extends NavSystemPage { this.updateNDInfo(_deltaTime); const IRSState = SimVar.GetSimVarValue("L:SALTY_IRS_STATE", "Enum"); + const IRSMinutesLeft = Math.floor(SimVar.GetSimVarValue("L:SALTY_IRS_TIME_LEFT", "Enum") / 60); + if (IRSState == 0) { this.mapBox.style.display = ""; this.trkBox.style.display = ""; + this.irsTimes.style.display = "none"; this.mapInstrument.style.display = "none"; } if (IRSState == 1) { this.trkBox.style.display = "none"; this.mapInstrument.style.display = "none"; + this.irsTimes.style.display = ""; + this.leftIRSValue.textContent = IRSMinutesLeft; + this.centerIRSValue.textContent = IRSMinutesLeft; + this.rightIRSValue.textContent = IRSMinutesLeft; } if (IRSState == 2) { this.mapBox.style.display = "none"; this.trkBox.style.display = "none"; this.mapInstrument.style.display = ""; + this.irsTimes.style.display = "none"; } } onEvent(_event) {