System: Fix FMGC bugs

This commit is contained in:
Josh Davidson 2019-08-13 17:35:23 -04:00
parent 162507f12f
commit db1d6c151f
2 changed files with 9 additions and 7 deletions

View file

@ -331,13 +331,13 @@ var ITAF = {
if (Internal.altTemp >= Position.indicatedAltitudeFtTemp) { if (Internal.altTemp >= Position.indicatedAltitudeFtTemp) {
Output.thrMode.setValue(2); Output.thrMode.setValue(2);
Text.thr.setValue("PITCH"); Text.thr.setValue("PITCH");
if (Internal.flchActive) { if (Internal.flchActive) { # Set before mode change to prevent it from overwriting by mistake
Text.vert.setValue("SPD CLB"); Text.vert.setValue("SPD CLB");
} }
} else { } else {
Output.thrMode.setValue(1); Output.thrMode.setValue(1);
Text.thr.setValue("PITCH"); Text.thr.setValue("PITCH");
if (Internal.flchActive) { if (Internal.flchActive) { # Set before mode change to prevent it from overwriting by mistake
Text.vert.setValue("SPD DES"); Text.vert.setValue("SPD DES");
} }
} }
@ -649,10 +649,12 @@ var ITAF = {
Text.vert.setValue("ALT CAP"); Text.vert.setValue("ALT CAP");
} else if (n == 4) { # FLCH } else if (n == 4) { # FLCH
Output.apprArm.setBoolValue(0); Output.apprArm.setBoolValue(0);
Output.vert.setValue(1); if (abs(Input.altDiff) >= 125) { # SPD CLB or SPD DES
Internal.alt.setValue(Input.alt.getValue()); if (Input.alt.getValue() >= Position.indicatedAltitudeFt.getValue()) { # Usually set Thrust Mode Selector, but we do it now due to timer lag
Internal.altDiff = Internal.alt.getValue() - Position.indicatedAltitudeFt.getValue(); Text.vert.setValue("SPD CLB");
if (abs(Internal.altDiff) >= 250) { # SPD CLB or SPD DES } else {
Text.vert.setValue("SPD DES");
}
Internal.altCaptureActive = 0; Internal.altCaptureActive = 0;
Output.vert.setValue(4); Output.vert.setValue(4);
Internal.flchActive = 1; Internal.flchActive = 1;

View file

@ -1 +1 @@
4802 4803