1
0
Fork 0

MAN PITCH TRIM is controlled now by elevator fault.

This commit is contained in:
legoboyvdlp R 2020-11-26 17:49:21 +00:00
parent 55e4dac6ac
commit 2bb5ec6578
2 changed files with 26 additions and 43 deletions

View file

@ -512,21 +512,19 @@ var canvas_PFD_base = {
me["FMA_rollarm_box"].hide();
me["FMA_Middle1"].hide();
me["FMA_Middle2"].hide();
if (wow1.getValue() == 0) {
if (fbw_curlaw == 2) {
me["FMA_ctr_msg"].setText("USE MAN PITCH TRIM");
me["FMA_ctr_msg"].setColor(0.7333,0.3803,0);
me["FMA_ctr_msg"].show();
} else if (fbw_curlaw == 3) {
me["FMA_ctr_msg"].setText("MAN PITCH TRIM ONLY");
me["FMA_ctr_msg"].setColor(1,0,0);
me["FMA_ctr_msg"].show();
} else {
me["FMA_ctr_msg"].hide();
}
if (fbw_curlaw == 2 and wow1.getValue() == 0) {
me["FMA_ctr_msg"].setText("USE MAN PITCH TRIM");
me["FMA_ctr_msg"].setColor(0.7333,0.3803,0);
me["FMA_ctr_msg"].show();
} else if (fbw_curlaw == 3) {
me["FMA_ctr_msg"].setText("MAN PITCH TRIM ONLY");
me["FMA_ctr_msg"].setColor(1,0,0);
me["FMA_ctr_msg"].show();
} else {
me["FMA_ctr_msg"].hide();
}
me["FMA_combined"].show();
if (pitch_box.getValue() == 1 and pitch_mode_act != " ") {
me["FMA_combined_box"].show();
@ -536,24 +534,18 @@ var canvas_PFD_base = {
} else {
me["FMA_combined"].hide();
me["FMA_combined_box"].hide();
if (wow1.getValue() == 0) {
if (fbw_curlaw == 2) {
me["FMA_ctr_msg"].setText("USE MAN PITCH TRIM");
me["FMA_ctr_msg"].setColor(0.7333,0.3803,0);
me["FMA_Middle1"].hide();
me["FMA_Middle2"].show();
me["FMA_ctr_msg"].show();
} else if (fbw_curlaw == 3) {
me["FMA_ctr_msg"].setText("MAN PITCH TRIM ONLY");
me["FMA_ctr_msg"].setColor(1,0,0);
me["FMA_Middle1"].hide();
me["FMA_Middle2"].show();
me["FMA_ctr_msg"].show();
} else {
me["FMA_ctr_msg"].hide();
me["FMA_Middle1"].show();
me["FMA_Middle2"].hide();
}
if (fbw_curlaw == 2 and wow1.getValue() == 0) {
me["FMA_ctr_msg"].setText("USE MAN PITCH TRIM");
me["FMA_ctr_msg"].setColor(0.7333,0.3803,0);
me["FMA_Middle1"].hide();
me["FMA_Middle2"].show();
me["FMA_ctr_msg"].show();
} else if (fbw_curlaw == 3) {
me["FMA_ctr_msg"].setText("MAN PITCH TRIM ONLY");
me["FMA_ctr_msg"].setColor(1,0,0);
me["FMA_Middle1"].hide();
me["FMA_Middle2"].show();
me["FMA_ctr_msg"].show();
} else {
me["FMA_ctr_msg"].hide();
me["FMA_Middle1"].show();

View file

@ -193,7 +193,10 @@ var update_loop = func {
tripleIRFail = !ir1 and !ir2 and !ir3;
doubleIRFail = (!ir1 and !ir2 and ir3) or (ir1 and !ir2 and !ir3) or (!ir1 and ir2 and !ir3);
if (tripleADRFail or doubleADRFail or doubleIRFail or tripleIRFail or dualFACFault or !FBW.yawdamper.getValue() or greenYellowFail or blueGreenFail or dualELACFault or (!elac1 and elac2 and ((green < 1500 and yellow >= 1500) or (green >= 1500 and yellow < 1500))) or (!elac2 and elac1 and blue < 1500) or tripleSECFault or systems.ELEC.EmerElec.getBoolValue()) {
if (dualELACFault and !sec1 and !sec2) {
FBW.degradeLaw.setValue(3);
FBW.apOff = 1;
} elsif (tripleADRFail or doubleADRFail or doubleIRFail or tripleIRFail or dualFACFault or !FBW.yawdamper.getValue() or greenYellowFail or blueGreenFail or dualELACFault or (!elac1 and elac2 and ((green < 1500 and yellow >= 1500) or (green >= 1500 and yellow < 1500))) or (!elac2 and elac1 and blue < 1500) or tripleSECFault or systems.ELEC.EmerElec.getBoolValue()) {
if (dualFACFault or !FBW.yawdamper.getValue() or greenYellowFail or (systems.ELEC.EmerElec.getBoolValue() and !fac1) or tripleIRFail) {
if (lawyaw == 0 or lawyaw == 1) {
FBW.degradeYawLaw.setValue(2);
@ -218,12 +221,6 @@ var update_loop = func {
FBW.degradeLaw.setValue(0);
FBW.apOff = 0;
}
if (dualELACFault and tripleSECFault and dualFACFault) {
FBW.degradeLaw.setValue(3);
FBW.apOff = 1;
}
# degrade loop runs faster; reset this variable
law = FBW.activeLaw.getValue();
@ -240,12 +237,6 @@ var update_loop = func {
}
}
# If they can, laws can go back to standard law
if (law == 3) {
if (!dualELACFault or !tripleSECFault or !dualFACFault) {
FBW.degradeLaw.setValue(2);
}
}
cas = pts.Instrumentation.AirspeedIndicator.indicatedSpdKt.getValue();
mmoIAS = (cas / pts.Instrumentation.AirspeedIndicator.indicatedMach.getValue()) * 0.82;