diff --git a/Cargo.toml b/Cargo.toml
index 95eab9f2..1377daed 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -20,4 +20,4 @@ strip = true
opt-level=1
lto = false
debug-assertions=true
-debug=true
\ No newline at end of file
+debug=true
diff --git a/flybywire b/flybywire
index ef7ea608..069f536c 160000
--- a/flybywire
+++ b/flybywire
@@ -1 +1 @@
-Subproject commit ef7ea60880144062e58e6108e5c34d48df50ece8
+Subproject commit 069f536c9d96f44920fae817d88d7bb336b2c20e
diff --git a/hsim-a318ceo/src/base/lvfr-horizonsim-airbus-a318-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a318-ceo/CDU/A320_Neo_CDU.html b/hsim-a318ceo/src/base/lvfr-horizonsim-airbus-a318-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a318-ceo/CDU/A320_Neo_CDU.html
index e0044fcf..a5b5795a 100644
--- a/hsim-a318ceo/src/base/lvfr-horizonsim-airbus-a318-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a318-ceo/CDU/A320_Neo_CDU.html
+++ b/hsim-a318ceo/src/base/lvfr-horizonsim-airbus-a318-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a318-ceo/CDU/A320_Neo_CDU.html
@@ -169,7 +169,6 @@
-
diff --git a/hsim-a318ceo/src/base/lvfr-horizonsim-airbus-a318-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a318-ceo/FCU/A320_Neo_FCU.js b/hsim-a318ceo/src/base/lvfr-horizonsim-airbus-a318-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a318-ceo/FCU/A320_Neo_FCU.js
index 5533bbcd..fe071917 100644
--- a/hsim-a318ceo/src/base/lvfr-horizonsim-airbus-a318-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a318-ceo/FCU/A320_Neo_FCU.js
+++ b/hsim-a318ceo/src/base/lvfr-horizonsim-airbus-a318-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a318-ceo/FCU/A320_Neo_FCU.js
@@ -179,7 +179,11 @@ class A320_Neo_FCU_Component {
}
setTextElementActive(_text, _active) {
if (_text != null) {
- _text.setAttribute("class", "Common " + (_active ? "Active" : "Inactive"));
+ if (_active === true) {
+ _text.classList.replace("Inactive", "Active");
+ } else {
+ _text.classList.replace("Active", "Inactive");
+ }
}
}
setElementVisibility(_element, _show) {
@@ -1380,20 +1384,20 @@ class A320_Neo_FCU_Pressure extends A320_Neo_FCU_Component {
this.currentValue = _value;
this.lightsTest = _lightsTest;
if (this.lightsTest) {
- this.standardElem.style.display = "none";
- this.selectedElem.style.display = "block";
+ this.setElementVisibility(this.standardElem, false);
+ this.setElementVisibility(this.selectedElem, true);
this.setTextElementActive(this.textQFE, true);
this.setTextElementActive(this.textQNH, true);
this.textValueContent = "88.88";
return;
}
if (this.currentMode == "STD") {
- this.standardElem.style.display = "block";
- this.selectedElem.style.display = "none";
+ this.setElementVisibility(this.standardElem, true);
+ this.setElementVisibility(this.selectedElem, false);
SimVar.SetSimVarValue("KOHLSMAN SETTING STD", "Bool", 1);
} else {
- this.standardElem.style.display = "none";
- this.selectedElem.style.display = "block";
+ this.setElementVisibility(this.standardElem, false);
+ this.setElementVisibility(this.selectedElem, true);
SimVar.SetSimVarValue("KOHLSMAN SETTING STD", "Bool", 0);
const isQFE = (this.currentMode == "QFE") ? true : false;
this.setTextElementActive(this.textQFE, isQFE);
diff --git a/hsim-a319ceo/src/base/lvfr-horizonsim-airbus-a319-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a319-ceo/CDU/A319_Ceo_CDU_CFM.html b/hsim-a319ceo/src/base/lvfr-horizonsim-airbus-a319-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a319-ceo/CDU/A319_Ceo_CDU_CFM.html
index 44259b7e..480c4bf8 100644
--- a/hsim-a319ceo/src/base/lvfr-horizonsim-airbus-a319-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a319-ceo/CDU/A319_Ceo_CDU_CFM.html
+++ b/hsim-a319ceo/src/base/lvfr-horizonsim-airbus-a319-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a319-ceo/CDU/A319_Ceo_CDU_CFM.html
@@ -169,7 +169,6 @@
-
diff --git a/hsim-a319ceo/src/base/lvfr-horizonsim-airbus-a319-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a319-ceo/CDU/A319_Ceo_CDU_IAE.html b/hsim-a319ceo/src/base/lvfr-horizonsim-airbus-a319-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a319-ceo/CDU/A319_Ceo_CDU_IAE.html
index 4b5eab4a..c0dfbe4e 100644
--- a/hsim-a319ceo/src/base/lvfr-horizonsim-airbus-a319-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a319-ceo/CDU/A319_Ceo_CDU_IAE.html
+++ b/hsim-a319ceo/src/base/lvfr-horizonsim-airbus-a319-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a319-ceo/CDU/A319_Ceo_CDU_IAE.html
@@ -169,7 +169,6 @@
-
diff --git a/hsim-a319ceo/src/base/lvfr-horizonsim-airbus-a319-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a319-ceo/CDU/A319_Ceo_CDU_SL.html b/hsim-a319ceo/src/base/lvfr-horizonsim-airbus-a319-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a319-ceo/CDU/A319_Ceo_CDU_SL.html
index 879e7f28..73507308 100644
--- a/hsim-a319ceo/src/base/lvfr-horizonsim-airbus-a319-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a319-ceo/CDU/A319_Ceo_CDU_SL.html
+++ b/hsim-a319ceo/src/base/lvfr-horizonsim-airbus-a319-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a319-ceo/CDU/A319_Ceo_CDU_SL.html
@@ -169,7 +169,6 @@
-
diff --git a/hsim-a319ceo/src/base/lvfr-horizonsim-airbus-a319-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a319-ceo/FCU/A320_Neo_FCU.js b/hsim-a319ceo/src/base/lvfr-horizonsim-airbus-a319-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a319-ceo/FCU/A320_Neo_FCU.js
index 5533bbcd..fe071917 100644
--- a/hsim-a319ceo/src/base/lvfr-horizonsim-airbus-a319-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a319-ceo/FCU/A320_Neo_FCU.js
+++ b/hsim-a319ceo/src/base/lvfr-horizonsim-airbus-a319-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a319-ceo/FCU/A320_Neo_FCU.js
@@ -179,7 +179,11 @@ class A320_Neo_FCU_Component {
}
setTextElementActive(_text, _active) {
if (_text != null) {
- _text.setAttribute("class", "Common " + (_active ? "Active" : "Inactive"));
+ if (_active === true) {
+ _text.classList.replace("Inactive", "Active");
+ } else {
+ _text.classList.replace("Active", "Inactive");
+ }
}
}
setElementVisibility(_element, _show) {
@@ -1380,20 +1384,20 @@ class A320_Neo_FCU_Pressure extends A320_Neo_FCU_Component {
this.currentValue = _value;
this.lightsTest = _lightsTest;
if (this.lightsTest) {
- this.standardElem.style.display = "none";
- this.selectedElem.style.display = "block";
+ this.setElementVisibility(this.standardElem, false);
+ this.setElementVisibility(this.selectedElem, true);
this.setTextElementActive(this.textQFE, true);
this.setTextElementActive(this.textQNH, true);
this.textValueContent = "88.88";
return;
}
if (this.currentMode == "STD") {
- this.standardElem.style.display = "block";
- this.selectedElem.style.display = "none";
+ this.setElementVisibility(this.standardElem, true);
+ this.setElementVisibility(this.selectedElem, false);
SimVar.SetSimVarValue("KOHLSMAN SETTING STD", "Bool", 1);
} else {
- this.standardElem.style.display = "none";
- this.selectedElem.style.display = "block";
+ this.setElementVisibility(this.standardElem, false);
+ this.setElementVisibility(this.selectedElem, true);
SimVar.SetSimVarValue("KOHLSMAN SETTING STD", "Bool", 0);
const isQFE = (this.currentMode == "QFE") ? true : false;
this.setTextElementActive(this.textQFE, isQFE);
diff --git a/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/CDU/A320_Ceo_CDU_CFM.html b/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/CDU/A320_Ceo_CDU_CFM.html
index 0d0daf0b..cd3eea51 100644
--- a/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/CDU/A320_Ceo_CDU_CFM.html
+++ b/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/CDU/A320_Ceo_CDU_CFM.html
@@ -169,7 +169,6 @@
-
diff --git a/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/CDU/A320_Ceo_CDU_CFM_SL.html b/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/CDU/A320_Ceo_CDU_CFM_SL.html
index c4f8dc24..e0890778 100644
--- a/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/CDU/A320_Ceo_CDU_CFM_SL.html
+++ b/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/CDU/A320_Ceo_CDU_CFM_SL.html
@@ -169,7 +169,6 @@
-
diff --git a/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/CDU/A320_Ceo_CDU_IAE.html b/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/CDU/A320_Ceo_CDU_IAE.html
index 9bc0012d..d36081c9 100644
--- a/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/CDU/A320_Ceo_CDU_IAE.html
+++ b/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/CDU/A320_Ceo_CDU_IAE.html
@@ -169,7 +169,6 @@
-
diff --git a/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/CDU/A320_Ceo_CDU_IAE_SL.html b/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/CDU/A320_Ceo_CDU_IAE_SL.html
index 4b273875..e2514a1b 100644
--- a/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/CDU/A320_Ceo_CDU_IAE_SL.html
+++ b/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/CDU/A320_Ceo_CDU_IAE_SL.html
@@ -169,7 +169,6 @@
-
diff --git a/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/FCU/A320_Neo_FCU.js b/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/FCU/A320_Neo_FCU.js
index 5533bbcd..fe071917 100644
--- a/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/FCU/A320_Neo_FCU.js
+++ b/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/FCU/A320_Neo_FCU.js
@@ -179,7 +179,11 @@ class A320_Neo_FCU_Component {
}
setTextElementActive(_text, _active) {
if (_text != null) {
- _text.setAttribute("class", "Common " + (_active ? "Active" : "Inactive"));
+ if (_active === true) {
+ _text.classList.replace("Inactive", "Active");
+ } else {
+ _text.classList.replace("Active", "Inactive");
+ }
}
}
setElementVisibility(_element, _show) {
@@ -1380,20 +1384,20 @@ class A320_Neo_FCU_Pressure extends A320_Neo_FCU_Component {
this.currentValue = _value;
this.lightsTest = _lightsTest;
if (this.lightsTest) {
- this.standardElem.style.display = "none";
- this.selectedElem.style.display = "block";
+ this.setElementVisibility(this.standardElem, false);
+ this.setElementVisibility(this.selectedElem, true);
this.setTextElementActive(this.textQFE, true);
this.setTextElementActive(this.textQNH, true);
this.textValueContent = "88.88";
return;
}
if (this.currentMode == "STD") {
- this.standardElem.style.display = "block";
- this.selectedElem.style.display = "none";
+ this.setElementVisibility(this.standardElem, true);
+ this.setElementVisibility(this.selectedElem, false);
SimVar.SetSimVarValue("KOHLSMAN SETTING STD", "Bool", 1);
} else {
- this.standardElem.style.display = "none";
- this.selectedElem.style.display = "block";
+ this.setElementVisibility(this.standardElem, false);
+ this.setElementVisibility(this.selectedElem, true);
SimVar.SetSimVarValue("KOHLSMAN SETTING STD", "Bool", 0);
const isQFE = (this.currentMode == "QFE") ? true : false;
this.setTextElementActive(this.textQFE, isQFE);
diff --git a/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/FMC/A320HS_FMCMainDisplay.js b/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/FMC/A320HS_FMCMainDisplay.js
index 5cd34883..499ad1b5 100644
--- a/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/FMC/A320HS_FMCMainDisplay.js
+++ b/hsim-a320ceo/src/base/lvfr-horizonsim-airbus-a320-ceo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a320-ceo/FMC/A320HS_FMCMainDisplay.js
@@ -1688,7 +1688,7 @@ class FMCMainDisplay extends BaseAirliners {
const dhValid = !mdaValid && inRange && typeof this.perfApprDH === 'number';
const mdaSsm = mdaValid ? Arinc429Word.SignStatusMatrix.NormalOperation : Arinc429Word.SignStatusMatrix.NoComputedData;
- const dhSsm = dhValid ? Arinc429Word.SignStatusMatrix.NormalOperation : Arinc429Word.SignStatusMatrix.NoComputedData
+ const dhSsm = dhValid ? Arinc429Word.SignStatusMatrix.NormalOperation : Arinc429Word.SignStatusMatrix.NoComputedData;
this.arincMDA.setBnrValue(mdaValid ? this.perfApprMDA : 0, mdaSsm, 17, 131072, 0);
this.arincDH.setBnrValue(dhValid ? this.perfApprDH : 0, dhSsm, 16, 8192, 0);
@@ -3088,7 +3088,7 @@ class FMCMainDisplay extends BaseAirliners {
const accAlt = match[4] !== undefined ? FMCMainDisplay.round(parseInt(match[4]), 10) : undefined;
const origin = this.flightPlanManager.getPersistentOrigin();
- let elevation = origin.infos.elevation !== undefined ? origin.infos.elevation : 0;
+ const elevation = origin.infos.elevation !== undefined ? origin.infos.elevation : 0;
const minimumAltitude = elevation + 400;
const newThrRed = thrRed !== undefined ? thrRed : plan.thrustReductionAltitude;
@@ -3143,7 +3143,7 @@ class FMCMainDisplay extends BaseAirliners {
const accAlt = parseInt(match[1]);
const origin = this.flightPlanManager.getPersistentOrigin();
- let elevation = origin.infos.elevation !== undefined ? origin.infos.elevation : 0;
+ const elevation = origin.infos.elevation !== undefined ? origin.infos.elevation : 0;
const minimumAltitude = elevation + 400;
if (accAlt < minimumAltitude || accAlt > 45000) {
@@ -3187,7 +3187,7 @@ class FMCMainDisplay extends BaseAirliners {
const accAlt = match[4] !== undefined ? FMCMainDisplay.round(parseInt(match[4]), 10) : undefined;
const destination = this.flightPlanManager.getDestination();
- let elevation = destination.infos.elevation !== undefined ? destination.infos.elevation : 0;
+ const elevation = destination.infos.elevation !== undefined ? destination.infos.elevation : 0;
const minimumAltitude = elevation + 400;
const newThrRed = thrRed !== undefined ? thrRed : plan.missedThrustReductionAltitude;
@@ -3242,7 +3242,7 @@ class FMCMainDisplay extends BaseAirliners {
const accAlt = parseInt(match[1]);
const destination = this.flightPlanManager.getDestination();
- let elevation = destination.infos.elevation !== undefined ? destination.infos.elevation : 0;
+ const elevation = destination.infos.elevation !== undefined ? destination.infos.elevation : 0;
const minimumAltitude = elevation + 400;
if (accAlt < minimumAltitude || accAlt > 45000) {
@@ -3307,14 +3307,14 @@ class FMCMainDisplay extends BaseAirliners {
originTransitionAltitude !== undefined ? originTransitionAltitude : 0,
originTransitionAltitude !== undefined ? Arinc429Word.SignStatusMatrix.NormalOperation : Arinc429Word.SignStatusMatrix.NoComputedData,
17, 131072, 0,
- )
+ );
const destinationTansitionLevel = this.flightPlanManager.destinationTransitionLevel;
this.arincTransitionLevel.setBnrValue(
destinationTansitionLevel !== undefined ? destinationTansitionLevel : 0,
destinationTansitionLevel !== undefined ? Arinc429Word.SignStatusMatrix.NormalOperation : Arinc429Word.SignStatusMatrix.NoComputedData,
9, 512, 0,
- )
+ );
}
//Needs PR Merge #3082
@@ -3793,7 +3793,7 @@ class FMCMainDisplay extends BaseAirliners {
const spd = parseInt(s);
if (!Number.isFinite(spd)) {
this.setScratchpadMessage(NXSystemMessages.formatError);
- return false
+ return false;
}
if (spd < 100 || spd > 350) {
@@ -4279,46 +4279,47 @@ class FMCMainDisplay extends BaseAirliners {
}
checkEFOBBelowMin() {
- if (!this._minDestFobEntered) {
- this.tryUpdateMinDestFob();
- }
+ if (this._fuelPredDone) {
+ if (!this._minDestFobEntered) {
+ this.tryUpdateMinDestFob();
+ }
- if (this._minDestFob) {
+ if (this._minDestFob) {
// round & only use 100kgs precision since thats how it is displayed in fuel pred
- const destEfob = Math.round(this.getDestEFOB(this.isAnEngineOn()) * 10) / 10;
- const roundedMinDestFob = Math.round(this._minDestFob * 10) / 10;
- if (!this._isBelowMinDestFob) {
- if (destEfob < roundedMinDestFob) {
- this._isBelowMinDestFob = true;
- // TODO should be in flight only and if fuel is below min dest efob for 2 minutes
- if (this.isAnEngineOn()) {
- setTimeout(() => {
+ const destEfob = Math.round(this.getDestEFOB(this.isAnEngineOn()) * 10) / 10;
+ const roundedMinDestFob = Math.round(this._minDestFob * 10) / 10;
+ if (!this._isBelowMinDestFob) {
+ if (destEfob < roundedMinDestFob) {
+ this._isBelowMinDestFob = true;
+ // TODO should be in flight only and if fuel is below min dest efob for 2 minutes
+ if (this.isAnEngineOn()) {
+ setTimeout(() => {
+ this.addMessageToQueue(NXSystemMessages.destEfobBelowMin, () => {
+ return this._EfobBelowMinClr === true;
+ }, () => {
+ this._EfobBelowMinClr = true;
+ });
+ }, 120000);
+ } else {
this.addMessageToQueue(NXSystemMessages.destEfobBelowMin, () => {
return this._EfobBelowMinClr === true;
}, () => {
this._EfobBelowMinClr = true;
});
- }, 120000);
- } else {
- this.addMessageToQueue(NXSystemMessages.destEfobBelowMin, () => {
- return this._EfobBelowMinClr === true;
- }, () => {
- this._EfobBelowMinClr = true;
- });
+ }
}
- }
- } else {
+ } else {
// check if we are at least 300kgs above min dest efob to show green again & the ability to trigger the message
- if (roundedMinDestFob) {
- if (destEfob - roundedMinDestFob >= 0.3) {
- this._isBelowMinDestFob = false;
- this.removeMessageFromQueue(NXSystemMessages.destEfobBelowMin)
+ if (roundedMinDestFob) {
+ if (destEfob - roundedMinDestFob >= 0.3) {
+ this._isBelowMinDestFob = false;
+ this.removeMessageFromQueue(NXSystemMessages.destEfobBelowMin);
+ }
}
}
}
}
}
-}
updateTowerHeadwind() {
if (isFinite(this.perfApprWindSpeed) && isFinite(this.perfApprWindHeading)) {
@@ -5209,7 +5210,7 @@ class FMCMainDisplay extends BaseAirliners {
if (Number.isFinite(mach)) {
if (mach < 0.15 || mach > 0.82) {
this.setScratchpadMessage(NXSystemMessages.entryOutOfRange);
- return false
+ return false;
}
this.managedSpeedDescendMachPilot = mach;
@@ -5222,7 +5223,7 @@ class FMCMainDisplay extends BaseAirliners {
if (Number.isFinite(mach)) {
if (mach < 0.15 || mach > 0.82) {
this.setScratchpadMessage(NXSystemMessages.entryOutOfRange);
- return false
+ return false;
}
this.managedSpeedDescendMachPilot = mach;
diff --git a/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/CDU/A321_Neo_CDU_LEAP.html b/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/CDU/A321_Neo_CDU_LEAP.html
index 4737d3a3..1d2be8cc 100644
--- a/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/CDU/A321_Neo_CDU_LEAP.html
+++ b/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/CDU/A321_Neo_CDU_LEAP.html
@@ -169,7 +169,6 @@
-
diff --git a/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/CDU/A321_Neo_CDU_LR_LEAP.html b/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/CDU/A321_Neo_CDU_LR_LEAP.html
index 19a35f36..279a601b 100644
--- a/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/CDU/A321_Neo_CDU_LR_LEAP.html
+++ b/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/CDU/A321_Neo_CDU_LR_LEAP.html
@@ -169,7 +169,6 @@
-
diff --git a/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/CDU/A321_Neo_CDU_LR_PW.html b/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/CDU/A321_Neo_CDU_LR_PW.html
index 8eac7f30..f4084021 100644
--- a/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/CDU/A321_Neo_CDU_LR_PW.html
+++ b/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/CDU/A321_Neo_CDU_LR_PW.html
@@ -169,7 +169,6 @@
-
diff --git a/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/CDU/A321_Neo_CDU_PW.html b/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/CDU/A321_Neo_CDU_PW.html
index b5737150..1b265d39 100644
--- a/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/CDU/A321_Neo_CDU_PW.html
+++ b/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/CDU/A321_Neo_CDU_PW.html
@@ -169,7 +169,6 @@
-
diff --git a/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/FCU/A320_Neo_FCU.js b/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/FCU/A320_Neo_FCU.js
index 5533bbcd..fe071917 100644
--- a/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/FCU/A320_Neo_FCU.js
+++ b/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/FCU/A320_Neo_FCU.js
@@ -179,7 +179,11 @@ class A320_Neo_FCU_Component {
}
setTextElementActive(_text, _active) {
if (_text != null) {
- _text.setAttribute("class", "Common " + (_active ? "Active" : "Inactive"));
+ if (_active === true) {
+ _text.classList.replace("Inactive", "Active");
+ } else {
+ _text.classList.replace("Active", "Inactive");
+ }
}
}
setElementVisibility(_element, _show) {
@@ -1380,20 +1384,20 @@ class A320_Neo_FCU_Pressure extends A320_Neo_FCU_Component {
this.currentValue = _value;
this.lightsTest = _lightsTest;
if (this.lightsTest) {
- this.standardElem.style.display = "none";
- this.selectedElem.style.display = "block";
+ this.setElementVisibility(this.standardElem, false);
+ this.setElementVisibility(this.selectedElem, true);
this.setTextElementActive(this.textQFE, true);
this.setTextElementActive(this.textQNH, true);
this.textValueContent = "88.88";
return;
}
if (this.currentMode == "STD") {
- this.standardElem.style.display = "block";
- this.selectedElem.style.display = "none";
+ this.setElementVisibility(this.standardElem, true);
+ this.setElementVisibility(this.selectedElem, false);
SimVar.SetSimVarValue("KOHLSMAN SETTING STD", "Bool", 1);
} else {
- this.standardElem.style.display = "none";
- this.selectedElem.style.display = "block";
+ this.setElementVisibility(this.standardElem, false);
+ this.setElementVisibility(this.selectedElem, true);
SimVar.SetSimVarValue("KOHLSMAN SETTING STD", "Bool", 0);
const isQFE = (this.currentMode == "QFE") ? true : false;
this.setTextElementActive(this.textQFE, isQFE);
diff --git a/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/FMC/A21NHS_FMCMainDisplay.js b/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/FMC/A21NHS_FMCMainDisplay.js
index 5cd34883..499ad1b5 100644
--- a/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/FMC/A21NHS_FMCMainDisplay.js
+++ b/hsim-a321neo/src/base/lvfr-horizonsim-airbus-a321-neo/html_ui/Pages/VCockpit/Instruments/Airliners/lvfr-horizonsim-airbus-a321-neo/FMC/A21NHS_FMCMainDisplay.js
@@ -1688,7 +1688,7 @@ class FMCMainDisplay extends BaseAirliners {
const dhValid = !mdaValid && inRange && typeof this.perfApprDH === 'number';
const mdaSsm = mdaValid ? Arinc429Word.SignStatusMatrix.NormalOperation : Arinc429Word.SignStatusMatrix.NoComputedData;
- const dhSsm = dhValid ? Arinc429Word.SignStatusMatrix.NormalOperation : Arinc429Word.SignStatusMatrix.NoComputedData
+ const dhSsm = dhValid ? Arinc429Word.SignStatusMatrix.NormalOperation : Arinc429Word.SignStatusMatrix.NoComputedData;
this.arincMDA.setBnrValue(mdaValid ? this.perfApprMDA : 0, mdaSsm, 17, 131072, 0);
this.arincDH.setBnrValue(dhValid ? this.perfApprDH : 0, dhSsm, 16, 8192, 0);
@@ -3088,7 +3088,7 @@ class FMCMainDisplay extends BaseAirliners {
const accAlt = match[4] !== undefined ? FMCMainDisplay.round(parseInt(match[4]), 10) : undefined;
const origin = this.flightPlanManager.getPersistentOrigin();
- let elevation = origin.infos.elevation !== undefined ? origin.infos.elevation : 0;
+ const elevation = origin.infos.elevation !== undefined ? origin.infos.elevation : 0;
const minimumAltitude = elevation + 400;
const newThrRed = thrRed !== undefined ? thrRed : plan.thrustReductionAltitude;
@@ -3143,7 +3143,7 @@ class FMCMainDisplay extends BaseAirliners {
const accAlt = parseInt(match[1]);
const origin = this.flightPlanManager.getPersistentOrigin();
- let elevation = origin.infos.elevation !== undefined ? origin.infos.elevation : 0;
+ const elevation = origin.infos.elevation !== undefined ? origin.infos.elevation : 0;
const minimumAltitude = elevation + 400;
if (accAlt < minimumAltitude || accAlt > 45000) {
@@ -3187,7 +3187,7 @@ class FMCMainDisplay extends BaseAirliners {
const accAlt = match[4] !== undefined ? FMCMainDisplay.round(parseInt(match[4]), 10) : undefined;
const destination = this.flightPlanManager.getDestination();
- let elevation = destination.infos.elevation !== undefined ? destination.infos.elevation : 0;
+ const elevation = destination.infos.elevation !== undefined ? destination.infos.elevation : 0;
const minimumAltitude = elevation + 400;
const newThrRed = thrRed !== undefined ? thrRed : plan.missedThrustReductionAltitude;
@@ -3242,7 +3242,7 @@ class FMCMainDisplay extends BaseAirliners {
const accAlt = parseInt(match[1]);
const destination = this.flightPlanManager.getDestination();
- let elevation = destination.infos.elevation !== undefined ? destination.infos.elevation : 0;
+ const elevation = destination.infos.elevation !== undefined ? destination.infos.elevation : 0;
const minimumAltitude = elevation + 400;
if (accAlt < minimumAltitude || accAlt > 45000) {
@@ -3307,14 +3307,14 @@ class FMCMainDisplay extends BaseAirliners {
originTransitionAltitude !== undefined ? originTransitionAltitude : 0,
originTransitionAltitude !== undefined ? Arinc429Word.SignStatusMatrix.NormalOperation : Arinc429Word.SignStatusMatrix.NoComputedData,
17, 131072, 0,
- )
+ );
const destinationTansitionLevel = this.flightPlanManager.destinationTransitionLevel;
this.arincTransitionLevel.setBnrValue(
destinationTansitionLevel !== undefined ? destinationTansitionLevel : 0,
destinationTansitionLevel !== undefined ? Arinc429Word.SignStatusMatrix.NormalOperation : Arinc429Word.SignStatusMatrix.NoComputedData,
9, 512, 0,
- )
+ );
}
//Needs PR Merge #3082
@@ -3793,7 +3793,7 @@ class FMCMainDisplay extends BaseAirliners {
const spd = parseInt(s);
if (!Number.isFinite(spd)) {
this.setScratchpadMessage(NXSystemMessages.formatError);
- return false
+ return false;
}
if (spd < 100 || spd > 350) {
@@ -4279,46 +4279,47 @@ class FMCMainDisplay extends BaseAirliners {
}
checkEFOBBelowMin() {
- if (!this._minDestFobEntered) {
- this.tryUpdateMinDestFob();
- }
+ if (this._fuelPredDone) {
+ if (!this._minDestFobEntered) {
+ this.tryUpdateMinDestFob();
+ }
- if (this._minDestFob) {
+ if (this._minDestFob) {
// round & only use 100kgs precision since thats how it is displayed in fuel pred
- const destEfob = Math.round(this.getDestEFOB(this.isAnEngineOn()) * 10) / 10;
- const roundedMinDestFob = Math.round(this._minDestFob * 10) / 10;
- if (!this._isBelowMinDestFob) {
- if (destEfob < roundedMinDestFob) {
- this._isBelowMinDestFob = true;
- // TODO should be in flight only and if fuel is below min dest efob for 2 minutes
- if (this.isAnEngineOn()) {
- setTimeout(() => {
+ const destEfob = Math.round(this.getDestEFOB(this.isAnEngineOn()) * 10) / 10;
+ const roundedMinDestFob = Math.round(this._minDestFob * 10) / 10;
+ if (!this._isBelowMinDestFob) {
+ if (destEfob < roundedMinDestFob) {
+ this._isBelowMinDestFob = true;
+ // TODO should be in flight only and if fuel is below min dest efob for 2 minutes
+ if (this.isAnEngineOn()) {
+ setTimeout(() => {
+ this.addMessageToQueue(NXSystemMessages.destEfobBelowMin, () => {
+ return this._EfobBelowMinClr === true;
+ }, () => {
+ this._EfobBelowMinClr = true;
+ });
+ }, 120000);
+ } else {
this.addMessageToQueue(NXSystemMessages.destEfobBelowMin, () => {
return this._EfobBelowMinClr === true;
}, () => {
this._EfobBelowMinClr = true;
});
- }, 120000);
- } else {
- this.addMessageToQueue(NXSystemMessages.destEfobBelowMin, () => {
- return this._EfobBelowMinClr === true;
- }, () => {
- this._EfobBelowMinClr = true;
- });
+ }
}
- }
- } else {
+ } else {
// check if we are at least 300kgs above min dest efob to show green again & the ability to trigger the message
- if (roundedMinDestFob) {
- if (destEfob - roundedMinDestFob >= 0.3) {
- this._isBelowMinDestFob = false;
- this.removeMessageFromQueue(NXSystemMessages.destEfobBelowMin)
+ if (roundedMinDestFob) {
+ if (destEfob - roundedMinDestFob >= 0.3) {
+ this._isBelowMinDestFob = false;
+ this.removeMessageFromQueue(NXSystemMessages.destEfobBelowMin);
+ }
}
}
}
}
}
-}
updateTowerHeadwind() {
if (isFinite(this.perfApprWindSpeed) && isFinite(this.perfApprWindHeading)) {
@@ -5209,7 +5210,7 @@ class FMCMainDisplay extends BaseAirliners {
if (Number.isFinite(mach)) {
if (mach < 0.15 || mach > 0.82) {
this.setScratchpadMessage(NXSystemMessages.entryOutOfRange);
- return false
+ return false;
}
this.managedSpeedDescendMachPilot = mach;
@@ -5222,7 +5223,7 @@ class FMCMainDisplay extends BaseAirliners {
if (Number.isFinite(mach)) {
if (mach < 0.15 || mach > 0.82) {
this.setScratchpadMessage(NXSystemMessages.entryOutOfRange);
- return false
+ return false;
}
this.managedSpeedDescendMachPilot = mach;
diff --git a/hsim-common/src/systems/instruments/src/EFB/Assets/A318GroundServiceOutline.tsx b/hsim-common/src/systems/instruments/src/EFB/Assets/A318GroundServiceOutline.tsx
index 9bf9ffdb..62d0a8e4 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Assets/A318GroundServiceOutline.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Assets/A318GroundServiceOutline.tsx
@@ -1,7 +1,7 @@
/* eslint-disable max-len */
import * as React from 'react';
// viewBox="0 0 777 814"
-export const GroundServiceOutline = ({ className, cabinLeftStatus, cabinRightStatus, aftLeftStatus, aftRightStatus }: {className: string, cabinLeftStatus: boolean, cabinRightStatus: boolean, aftLeftStatus: boolean, aftRightStatus: boolean}) => (
+export const A318GroundServiceOutline = ({ className, cabinLeftStatus, cabinRightStatus, aftLeftStatus, aftRightStatus }: {className: string, cabinLeftStatus: boolean, cabinRightStatus: boolean, aftLeftStatus: boolean, aftRightStatus: boolean}) => (
-
-
-
-
-
@@ -63,9 +63,9 @@ export const GroundServiceOutline = ({ className, cabinLeftStatus, cabinRightSta
-
@@ -102,9 +102,9 @@ export const GroundServiceOutline = ({ className, cabinLeftStatus, cabinRightSta
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/hsim-common/src/systems/instruments/src/EFB/Assets/A319GroundServiceOutline.tsx b/hsim-common/src/systems/instruments/src/EFB/Assets/A319GroundServiceOutline.tsx
index b742e496..4197f757 100644
--- a/hsim-common/src/systems/instruments/src/EFB/Assets/A319GroundServiceOutline.tsx
+++ b/hsim-common/src/systems/instruments/src/EFB/Assets/A319GroundServiceOutline.tsx
@@ -1,14 +1,14 @@
/* eslint-disable max-len */
import * as React from 'react';
// viewBox="0 0 777 814"
-export const GroundServiceOutline = ({ className, cabinLeftStatus, cabinRightStatus, aftLeftStatus, aftRightStatus }: {className: string, cabinLeftStatus: boolean, cabinRightStatus: boolean, aftLeftStatus: boolean, aftRightStatus: boolean}) => (
-